From 9161b327f892cfe9d42a6c0055f83d3e296f3415 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 18 Mar 2026 20:39:23 +0000 Subject: [PATCH] Regenerate client from commit 008fc5a of spec repo --- .generator/schemas/v2/openapi.yaml | 1259 +++++++++++++++++ ...-a-feature-flag-returns-OK-response.frozen | 1 + ...ive-a-feature-flag-returns-OK-response.yml | 105 ++ ...ature-flag-returns-Created-response.frozen | 1 + ...-feature-flag-returns-Created-response.yml | 58 + ...nvironment-returns-Created-response.frozen | 1 + ...n-environment-returns-Created-response.yml | 41 + ...-a-feature-flag-returns-OK-response.frozen | 1 + ...Get-a-feature-flag-returns-OK-response.yml | 81 ++ ...t-feature-flags-returns-OK-response.frozen | 1 + ...List-feature-flags-returns-OK-response.yml | 276 ++++ ...-a-feature-flag-returns-OK-response.frozen | 1 + ...ate-a-feature-flag-returns-OK-response.yml | 86 ++ .../v2/feature-flags/ArchiveFeatureFlag.rb | 8 + .../v2/feature-flags/CreateEnvironment.rb | 18 + .../v2/feature-flags/CreateFeatureFlag.rb | 30 + .../v2/feature-flags/DeleteEnvironment.rb | 8 + .../DisableFeatureFlagEnvironment.rb | 11 + .../EnableFeatureFlagEnvironment.rb | 11 + examples/v2/feature-flags/GetEnvironment.rb | 8 + examples/v2/feature-flags/GetFeatureFlag.rb | 8 + examples/v2/feature-flags/ListEnvironments.rb | 5 + examples/v2/feature-flags/ListFeatureFlags.rb | 5 + .../v2/feature-flags/UnarchiveFeatureFlag.rb | 8 + .../v2/feature-flags/UpdateEnvironment.rb | 21 + .../v2/feature-flags/UpdateFeatureFlag.rb | 18 + features/scenarios_model_mapping.rb | 52 + features/v2/feature_flags.feature | 265 ++++ features/v2/given.json | 24 + features/v2/undo.json | 106 ++ lib/datadog_api_client/inflector.rb | 34 + .../v2/api/feature_flags_api.rb | 930 ++++++++++++ .../v2/api/security_monitoring_api.rb | 2 + .../models/create_environment_attributes.rb | 170 +++ .../v2/models/create_environment_data.rb | 144 ++ .../v2/models/create_environment_data_type.rb | 26 + .../v2/models/create_environment_request.rb | 123 ++ .../models/create_feature_flag_attributes.rb | 238 ++++ .../v2/models/create_feature_flag_data.rb | 144 ++ .../models/create_feature_flag_data_type.rb | 26 + .../v2/models/create_feature_flag_request.rb | 123 ++ .../v2/models/create_variant.rb | 165 +++ .../v2/models/environment.rb | 165 +++ .../v2/models/environment_attributes.rb | 214 +++ .../v2/models/environment_response.rb | 123 ++ .../v2/models/environments_pagination_meta.rb | 105 ++ .../environments_pagination_meta_page.rb | 115 ++ .../v2/models/feature_flag.rb | 165 +++ .../v2/models/feature_flag_attributes.rb | 310 ++++ .../v2/models/feature_flag_environment.rb | 282 ++++ .../v2/models/feature_flag_response.rb | 123 ++ .../v2/models/feature_flag_status.rb | 27 + .../models/feature_flags_pagination_meta.rb | 105 ++ .../feature_flags_pagination_meta_page.rb | 115 ++ .../v2/models/list_environments_response.rb | 135 ++ .../v2/models/list_feature_flags_response.rb | 135 ++ .../models/update_environment_attributes.rb | 155 ++ .../v2/models/update_environment_data.rb | 144 ++ .../v2/models/update_environment_data_type.rb | 26 + .../v2/models/update_environment_request.rb | 123 ++ .../models/update_feature_flag_attributes.rb | 133 ++ .../v2/models/update_feature_flag_data.rb | 144 ++ .../models/update_feature_flag_data_type.rb | 26 + .../v2/models/update_feature_flag_request.rb | 123 ++ .../v2/models/value_type.rb | 30 + lib/datadog_api_client/v2/models/variant.rb | 206 +++ 66 files changed, 7872 insertions(+) create mode 100644 cassettes/features/v2/feature_flags/Archive-a-feature-flag-returns-OK-response.frozen create mode 100644 cassettes/features/v2/feature_flags/Archive-a-feature-flag-returns-OK-response.yml create mode 100644 cassettes/features/v2/feature_flags/Create-a-feature-flag-returns-Created-response.frozen create mode 100644 cassettes/features/v2/feature_flags/Create-a-feature-flag-returns-Created-response.yml create mode 100644 cassettes/features/v2/feature_flags/Create-an-environment-returns-Created-response.frozen create mode 100644 cassettes/features/v2/feature_flags/Create-an-environment-returns-Created-response.yml create mode 100644 cassettes/features/v2/feature_flags/Get-a-feature-flag-returns-OK-response.frozen create mode 100644 cassettes/features/v2/feature_flags/Get-a-feature-flag-returns-OK-response.yml create mode 100644 cassettes/features/v2/feature_flags/List-feature-flags-returns-OK-response.frozen create mode 100644 cassettes/features/v2/feature_flags/List-feature-flags-returns-OK-response.yml create mode 100644 cassettes/features/v2/feature_flags/Update-a-feature-flag-returns-OK-response.frozen create mode 100644 cassettes/features/v2/feature_flags/Update-a-feature-flag-returns-OK-response.yml create mode 100644 examples/v2/feature-flags/ArchiveFeatureFlag.rb create mode 100644 examples/v2/feature-flags/CreateEnvironment.rb create mode 100644 examples/v2/feature-flags/CreateFeatureFlag.rb create mode 100644 examples/v2/feature-flags/DeleteEnvironment.rb create mode 100644 examples/v2/feature-flags/DisableFeatureFlagEnvironment.rb create mode 100644 examples/v2/feature-flags/EnableFeatureFlagEnvironment.rb create mode 100644 examples/v2/feature-flags/GetEnvironment.rb create mode 100644 examples/v2/feature-flags/GetFeatureFlag.rb create mode 100644 examples/v2/feature-flags/ListEnvironments.rb create mode 100644 examples/v2/feature-flags/ListFeatureFlags.rb create mode 100644 examples/v2/feature-flags/UnarchiveFeatureFlag.rb create mode 100644 examples/v2/feature-flags/UpdateEnvironment.rb create mode 100644 examples/v2/feature-flags/UpdateFeatureFlag.rb create mode 100644 features/v2/feature_flags.feature create mode 100644 lib/datadog_api_client/v2/api/feature_flags_api.rb create mode 100644 lib/datadog_api_client/v2/models/create_environment_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/create_environment_data.rb create mode 100644 lib/datadog_api_client/v2/models/create_environment_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/create_environment_request.rb create mode 100644 lib/datadog_api_client/v2/models/create_feature_flag_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/create_feature_flag_data.rb create mode 100644 lib/datadog_api_client/v2/models/create_feature_flag_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/create_feature_flag_request.rb create mode 100644 lib/datadog_api_client/v2/models/create_variant.rb create mode 100644 lib/datadog_api_client/v2/models/environment.rb create mode 100644 lib/datadog_api_client/v2/models/environment_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/environment_response.rb create mode 100644 lib/datadog_api_client/v2/models/environments_pagination_meta.rb create mode 100644 lib/datadog_api_client/v2/models/environments_pagination_meta_page.rb create mode 100644 lib/datadog_api_client/v2/models/feature_flag.rb create mode 100644 lib/datadog_api_client/v2/models/feature_flag_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/feature_flag_environment.rb create mode 100644 lib/datadog_api_client/v2/models/feature_flag_response.rb create mode 100644 lib/datadog_api_client/v2/models/feature_flag_status.rb create mode 100644 lib/datadog_api_client/v2/models/feature_flags_pagination_meta.rb create mode 100644 lib/datadog_api_client/v2/models/feature_flags_pagination_meta_page.rb create mode 100644 lib/datadog_api_client/v2/models/list_environments_response.rb create mode 100644 lib/datadog_api_client/v2/models/list_feature_flags_response.rb create mode 100644 lib/datadog_api_client/v2/models/update_environment_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/update_environment_data.rb create mode 100644 lib/datadog_api_client/v2/models/update_environment_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/update_environment_request.rb create mode 100644 lib/datadog_api_client/v2/models/update_feature_flag_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/update_feature_flag_data.rb create mode 100644 lib/datadog_api_client/v2/models/update_feature_flag_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/update_feature_flag_request.rb create mode 100644 lib/datadog_api_client/v2/models/value_type.rb create mode 100644 lib/datadog_api_client/v2/models/variant.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 7c5de28af805..091cc049f2af 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -1285,6 +1285,24 @@ components: required: true schema: type: string + environment_id: + description: The ID of the environment. + in: path + name: environment_id + required: true + schema: + example: 550e8400-e29b-41d4-a716-446655440001 + format: uuid + type: string + feature_flag_id: + description: The ID of the feature flag. + in: path + name: feature_flag_id + required: true + schema: + example: 550e8400-e29b-41d4-a716-446655440000 + format: uuid + type: string requestBodies: {} responses: BadRequestResponse: @@ -15317,6 +15335,130 @@ components: - address - formats type: object + CreateEnvironmentAttributes: + description: Attributes for creating a new environment. + properties: + is_production: + default: false + description: Indicates whether this is a production environment. + example: false + type: boolean + name: + description: The name of the environment. + example: env-search-term + type: string + queries: + description: List of queries to define the environment scope. + example: + - staging + - test + items: + type: string + minItems: 1 + type: array + require_feature_flag_approval: + default: false + description: Indicates whether feature flag changes require approval in + this environment. + example: false + type: boolean + required: + - name + - queries + type: object + CreateEnvironmentData: + description: Data for creating a new environment. + properties: + attributes: + $ref: '#/components/schemas/CreateEnvironmentAttributes' + type: + $ref: '#/components/schemas/CreateEnvironmentDataType' + required: + - type + - attributes + type: object + CreateEnvironmentDataType: + description: The resource type. + enum: + - environments + example: environments + type: string + x-enum-varnames: + - ENVIRONMENTS + CreateEnvironmentRequest: + description: Request to create a new environment. + properties: + data: + $ref: '#/components/schemas/CreateEnvironmentData' + required: + - data + type: object + CreateFeatureFlagAttributes: + description: Attributes for creating a new feature flag. + properties: + default_variant_key: + description: The key of the default variant. + example: variant-abc123 + nullable: true + type: string + description: + description: The description of the feature flag. + example: This is an example feature flag for demonstration + type: string + json_schema: + description: JSON schema for validation when value_type is JSON. + example: '{"type": "object", "properties": {"enabled": {"type": "boolean"}}}' + nullable: true + type: string + key: + description: The unique key of the feature flag. + example: feature-flag-abc123 + type: string + name: + description: The name of the feature flag. + example: Feature Flag ABC123 + type: string + value_type: + $ref: '#/components/schemas/ValueType' + variants: + description: The variants of the feature flag. + items: + $ref: '#/components/schemas/CreateVariant' + type: array + required: + - key + - name + - description + - value_type + - variants + type: object + CreateFeatureFlagData: + description: Data for creating a new feature flag. + properties: + attributes: + $ref: '#/components/schemas/CreateFeatureFlagAttributes' + type: + $ref: '#/components/schemas/CreateFeatureFlagDataType' + required: + - type + - attributes + type: object + CreateFeatureFlagDataType: + description: The resource type. + enum: + - feature-flags + example: feature-flags + type: string + x-enum-varnames: + - FEATURE_FLAGS + CreateFeatureFlagRequest: + description: Request to create a new feature flag. + properties: + data: + $ref: '#/components/schemas/CreateFeatureFlagData' + required: + - data + type: object CreateIncidentNotificationRuleRequest: description: Create request for a notification rule. properties: @@ -16640,6 +16782,26 @@ components: required: - data type: object + CreateVariant: + description: Request to create a variant. + properties: + key: + description: The unique key of the variant. + example: variant-abc123 + type: string + name: + description: The name of the variant. + example: Variant ABC123 + type: string + value: + description: The value of the variant as a string. + example: 'true' + type: string + required: + - key + - name + - value + type: object CreateWorkflowRequest: description: A request object for creating a new workflow. example: @@ -23244,6 +23406,97 @@ components: minLength: 1 type: string type: object + Environment: + description: A feature flag environment resource. + properties: + attributes: + $ref: '#/components/schemas/EnvironmentAttributes' + id: + description: The unique identifier of the environment. + example: 550e8400-e29b-41d4-a716-446655440001 + format: uuid + type: string + type: + $ref: '#/components/schemas/CreateEnvironmentDataType' + required: + - id + - type + - attributes + type: object + EnvironmentAttributes: + description: Attributes of an environment. + properties: + created_at: + description: The timestamp when the environment was created. + example: '2023-01-01T00:00:00Z' + format: date-time + type: string + description: + description: The description of the environment. + example: Test environment XYZ789 + nullable: true + type: string + is_production: + description: Indicates whether this is a production environment. + example: false + type: boolean + key: + description: The unique key of the environment. + example: env-search-term + type: string + name: + description: The name of the environment. + example: env-search-term + type: string + queries: + description: List of queries to define the environment scope. + example: + - staging + - test + items: + type: string + minItems: 1 + type: array + require_feature_flag_approval: + description: Indicates whether feature flag changes require approval in + this environment. + example: false + type: boolean + updated_at: + description: The timestamp when the environment was last updated. + example: '2023-01-01T00:00:00Z' + format: date-time + type: string + required: + - name + type: object + EnvironmentResponse: + description: Response containing an environment. + properties: + data: + $ref: '#/components/schemas/Environment' + required: + - data + type: object + EnvironmentsPaginationMeta: + description: Pagination metadata for environments. + properties: + page: + $ref: '#/components/schemas/EnvironmentsPaginationMetaPage' + type: object + EnvironmentsPaginationMetaPage: + properties: + total_count: + description: Total number of items. + example: 10 + format: int64 + type: integer + total_filtered_count: + description: Total number of items matching the filter. + example: 5 + format: int64 + type: integer + type: object ErrorHandler: description: Used to handle errors in an action. properties: @@ -25047,6 +25300,204 @@ components: $ref: '#/components/schemas/FastlyServiceData' type: array type: object + FeatureFlag: + description: A feature flag resource. + properties: + attributes: + $ref: '#/components/schemas/FeatureFlagAttributes' + id: + description: The unique identifier of the feature flag. + example: 550e8400-e29b-41d4-a716-446655440000 + format: uuid + type: string + type: + $ref: '#/components/schemas/CreateFeatureFlagDataType' + required: + - id + - type + - attributes + type: object + FeatureFlagAttributes: + description: Attributes of a feature flag. + properties: + archived_at: + description: The timestamp when the feature flag was archived. + example: '2023-01-01T00:00:00Z' + format: date-time + nullable: true + type: string + created_at: + description: The timestamp when the feature flag was created. + example: '2023-01-01T00:00:00Z' + format: date-time + type: string + created_by: + description: The ID of the user who created the feature flag. + example: 550e8400-e29b-41d4-a716-446655440010 + format: uuid + type: string + description: + description: The description of the feature flag. + example: This is an example feature flag for demonstration + type: string + distribution_channel: + description: Distribution channel for the feature flag. + example: ALL + type: string + feature_flag_environments: + description: Environment-specific settings for the feature flag. + items: + $ref: '#/components/schemas/FeatureFlagEnvironment' + type: array + json_schema: + description: JSON schema for validation when value_type is JSON. + example: '{"type": "object", "properties": {"enabled": {"type": "boolean"}}}' + nullable: true + type: string + key: + description: The unique key of the feature flag. + example: feature-flag-abc123 + type: string + last_updated_by: + description: The ID of the user who last updated the feature flag. + example: 550e8400-e29b-41d4-a716-446655440010 + format: uuid + type: string + name: + description: The name of the feature flag. + example: Feature Flag ABC123 + type: string + require_approval: + description: Indicates whether this feature flag requires approval for changes. + example: false + type: boolean + updated_at: + description: The timestamp when the feature flag was last updated. + example: '2023-01-01T00:00:00Z' + format: date-time + type: string + value_type: + $ref: '#/components/schemas/ValueType' + variants: + description: The variants of the feature flag. + items: + $ref: '#/components/schemas/Variant' + type: array + required: + - key + - name + - description + - value_type + - variants + type: object + FeatureFlagEnvironment: + description: Environment-specific settings for a feature flag. + properties: + allocations: + additionalProperties: {} + description: Allocation metadata for this environment. + nullable: true + type: object + default_allocation_key: + description: The allocation key used for the default variant. + example: allocation-default-123abc + type: string + default_variant_id: + description: The ID of the default variant for this environment. + example: 550e8400-e29b-41d4-a716-446655440002 + nullable: true + type: string + environment_id: + description: The ID of the environment. + example: 550e8400-e29b-41d4-a716-446655440001 + format: uuid + type: string + environment_name: + description: The name of the environment. + example: env-search-term + type: string + is_production: + description: Indicates whether the environment is production. + example: false + type: boolean + override_allocation_key: + description: The allocation key used for the override variant. + example: allocation-override-123abc + type: string + override_variant_id: + description: The ID of the override variant for this environment. + example: 550e8400-e29b-41d4-a716-446655440003 + nullable: true + type: string + pending_suggestion_id: + description: Pending suggestion identifier, if approval is required. + example: 550e8400-e29b-41d4-a716-446655440099 + nullable: true + type: string + require_feature_flag_approval: + description: Indicates whether feature flag changes require approval in + this environment. + example: false + type: boolean + rollout_percentage: + description: Rollout percentage for this environment. + example: 0 + format: int64 + maximum: 100 + minimum: 0 + type: integer + rules: + description: Environment targeting rules for this feature flag. + items: + $ref: '#/components/schemas/FeatureFlagTargetingRule' + type: array + status: + $ref: '#/components/schemas/FeatureFlagStatus' + required: + - environment_id + - status + type: object + FeatureFlagResponse: + description: Response containing a feature flag. + properties: + data: + $ref: '#/components/schemas/FeatureFlag' + required: + - data + type: object + FeatureFlagStatus: + description: The status of a feature flag in an environment. + enum: + - ENABLED + - DISABLED + example: ENABLED + type: string + x-enum-varnames: + - ENABLED + - DISABLED + FeatureFlagTargetingRule: + additionalProperties: {} + description: A targeting rule for a feature flag. + type: object + FeatureFlagsPaginationMeta: + description: Pagination metadata for feature flags. + properties: + page: + $ref: '#/components/schemas/FeatureFlagsPaginationMetaPage' + type: object + FeatureFlagsPaginationMetaPage: + properties: + total_count: + description: Total number of items. + example: 100 + format: int64 + type: integer + total_filtered_count: + description: Total number of items matching the filter. + example: 25 + format: int64 + type: integer + type: object FiltersPerProduct: description: Product-specific filters for the dataset. properties: @@ -36782,6 +37233,32 @@ components: description: Current link. type: string type: object + ListEnvironmentsResponse: + description: Response containing a list of environments. + properties: + data: + description: List of environments. + items: + $ref: '#/components/schemas/Environment' + type: array + meta: + $ref: '#/components/schemas/EnvironmentsPaginationMeta' + required: + - data + type: object + ListFeatureFlagsResponse: + description: Response containing a list of feature flags. + properties: + data: + description: List of feature flags. + items: + $ref: '#/components/schemas/FeatureFlag' + type: array + meta: + $ref: '#/components/schemas/FeatureFlagsPaginationMeta' + required: + - data + type: object ListFindingsData: description: Array of findings. items: @@ -70279,6 +70756,103 @@ components: - name - options type: object + UpdateEnvironmentAttributes: + description: Attributes for updating an environment. + properties: + is_production: + description: Indicates whether this is a production environment. + example: false + type: boolean + name: + description: The name of the environment. + example: Environment XYZ789 + type: string + queries: + description: List of queries to define the environment scope. + example: + - staging + - test + items: + type: string + minItems: 1 + type: array + require_feature_flag_approval: + description: Indicates whether feature flag changes require approval in + this environment. + example: true + type: boolean + type: object + UpdateEnvironmentData: + description: Data for updating an environment. + properties: + attributes: + $ref: '#/components/schemas/UpdateEnvironmentAttributes' + type: + $ref: '#/components/schemas/UpdateEnvironmentDataType' + required: + - type + - attributes + type: object + UpdateEnvironmentDataType: + description: The resource type. + enum: + - environments + example: environments + type: string + x-enum-varnames: + - ENVIRONMENTS + UpdateEnvironmentRequest: + description: Request to update an environment. + properties: + data: + $ref: '#/components/schemas/UpdateEnvironmentData' + required: + - data + type: object + UpdateFeatureFlagAttributes: + description: Attributes for updating a feature flag. + properties: + description: + description: The description of the feature flag. + example: Updated description for feature flag XYZ789 + type: string + json_schema: + description: JSON schema for validation when value_type is JSON. + example: '{"type": "object", "properties": {"enabled": {"type": "boolean"}}}' + nullable: true + type: string + name: + description: The name of the feature flag. + example: Updated Feature Flag XYZ789 + type: string + type: object + UpdateFeatureFlagData: + description: Data for updating a feature flag. + properties: + attributes: + $ref: '#/components/schemas/UpdateFeatureFlagAttributes' + type: + $ref: '#/components/schemas/UpdateFeatureFlagDataType' + required: + - type + - attributes + type: object + UpdateFeatureFlagDataType: + description: The resource type. + enum: + - feature-flags + example: feature-flags + type: string + x-enum-varnames: + - FEATURE_FLAGS + UpdateFeatureFlagRequest: + description: Request to update a feature flag. + properties: + data: + $ref: '#/components/schemas/UpdateFeatureFlagData' + required: + - data + type: object UpdateFlakyTestsRequest: description: Request to update the state of multiple flaky tests. properties: @@ -71925,6 +72499,58 @@ components: $ref: '#/components/schemas/ValidationError' type: array type: object + ValueType: + description: The type of values for the feature flag variants. + enum: + - BOOLEAN + - INTEGER + - NUMERIC + - STRING + - JSON + example: BOOLEAN + type: string + x-enum-varnames: + - BOOLEAN + - INTEGER + - NUMERIC + - STRING + - JSON + Variant: + description: A variant of a feature flag. + properties: + created_at: + description: The timestamp when the variant was created. + example: '2023-01-01T00:00:00Z' + format: date-time + type: string + id: + description: The unique identifier of the variant. + example: 550e8400-e29b-41d4-a716-446655440002 + format: uuid + type: string + key: + description: The unique key of the variant. + example: variant-abc123 + type: string + name: + description: The name of the variant. + example: Variant ABC123 + type: string + updated_at: + description: The timestamp when the variant was last updated. + example: '2023-01-01T00:00:00Z' + format: date-time + type: string + value: + description: The value of the variant as a string. + example: 'true' + type: string + required: + - id + - key + - name + - value + type: object Version: description: Version of the notification rule. It is updated when the rule is modified. @@ -84135,6 +84761,630 @@ paths: operator: OR permissions: - events_read + /api/v2/feature-flags: + get: + description: 'Returns a list of feature flags for the organization. + + Supports filtering by key and archived status.' + operationId: ListFeatureFlags + parameters: + - description: Filter feature flags by key (partial matching). + example: flag-search-term + in: query + name: key + schema: + type: string + - description: Filter by archived status. + example: false + in: query + name: is_archived + schema: + type: boolean + - description: Maximum number of results to return. + example: 10 + in: query + name: limit + schema: + default: 100 + maximum: 1000 + minimum: 1 + type: integer + - description: Number of results to skip. + example: 0 + in: query + name: offset + schema: + default: 0 + minimum: 0 + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ListFeatureFlagsResponse' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List feature flags + tags: + - Feature Flags + x-permission: + operator: AND + permissions: + - feature_flag_config_read + - feature_flag_environment_config_read + post: + description: Creates a new feature flag with variants. + operationId: CreateFeatureFlag + requestBody: + content: + application/json: + example: + data: + attributes: + description: Demo feature flag with unique identifier + key: feature-flag-demo123 + name: Feature Flag Demo123 + value_type: BOOLEAN + variants: + - key: variant-demo123 + name: Variant Demo123 + value: 'true' + type: feature-flags + schema: + $ref: '#/components/schemas/CreateFeatureFlagRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/FeatureFlagResponse' + description: Created + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Conflict + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Create a feature flag + tags: + - Feature Flags + x-permission: + operator: AND + permissions: + - feature_flag_config_write + - feature_flag_environment_config_read + /api/v2/feature-flags/environments: + get: + description: 'Returns a list of environments for the organization. + + Supports filtering by name and key.' + operationId: ListEnvironments + parameters: + - description: Filter environments by name (partial matching). + example: env-search-term + in: query + name: name + schema: + type: string + - description: Filter environments by key (partial matching). + example: env-partial + in: query + name: key + schema: + type: string + - description: Maximum number of results to return. + example: 10 + in: query + name: limit + schema: + default: 100 + maximum: 1000 + minimum: 1 + type: integer + - description: Number of results to skip. + example: 0 + in: query + name: offset + schema: + default: 0 + minimum: 0 + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ListEnvironmentsResponse' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List environments + tags: + - Feature Flags + x-permission: + operator: AND + permissions: + - feature_flag_environment_config_read + post: + description: Creates a new environment for organizing feature flags. + operationId: CreateEnvironment + requestBody: + content: + application/json: + example: + data: + attributes: + name: Environment Demo123 + queries: + - env-demo123 + - queries-demo456 + type: environments + schema: + $ref: '#/components/schemas/CreateEnvironmentRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentResponse' + description: Created + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Conflict + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Create an environment + tags: + - Feature Flags + x-permission: + operator: AND + permissions: + - feature_flag_environment_config_write + /api/v2/feature-flags/environments/{environment_id}: + delete: + description: Deletes an environment. This operation cannot be undone. + operationId: DeleteEnvironment + parameters: + - $ref: '#/components/parameters/environment_id' + responses: + '204': + description: No Content + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Delete an environment + tags: + - Feature Flags + x-permission: + operator: AND + permissions: + - feature_flag_environment_config_write + get: + description: Returns the details of a specific environment. + operationId: GetEnvironment + parameters: + - $ref: '#/components/parameters/environment_id' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentResponse' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get an environment + tags: + - Feature Flags + x-permission: + operator: AND + permissions: + - feature_flag_environment_config_read + put: + description: "Updates an existing environment's metadata such as\n name and + description." + operationId: UpdateEnvironment + parameters: + - $ref: '#/components/parameters/environment_id' + requestBody: + content: + application/json: + example: + data: + attributes: + name: Updated Environment XYZ789 + queries: + - updated-env-xyz789 + - updated-queries-abc456 + type: environments + schema: + $ref: '#/components/schemas/UpdateEnvironmentRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Update an environment + tags: + - Feature Flags + x-permission: + operator: AND + permissions: + - feature_flag_environment_config_write + /api/v2/feature-flags/{feature_flag_id}: + get: + description: 'Returns the details of a specific feature flag + + including variants and environment status.' + operationId: GetFeatureFlag + parameters: + - $ref: '#/components/parameters/feature_flag_id' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FeatureFlagResponse' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get a feature flag + tags: + - Feature Flags + x-permission: + operator: AND + permissions: + - feature_flag_config_read + - feature_flag_environment_config_read + put: + description: "Updates an existing feature flag's metadata such as\n name and + description. Does not modify targeting rules or allocations." + operationId: UpdateFeatureFlag + parameters: + - $ref: '#/components/parameters/feature_flag_id' + requestBody: + content: + application/json: + example: + data: + attributes: + description: Updated description for feature flag XYZ789 + name: Updated Feature Flag XYZ789 + type: feature-flags + schema: + $ref: '#/components/schemas/UpdateFeatureFlagRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FeatureFlagResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Update a feature flag + tags: + - Feature Flags + x-permission: + operator: AND + permissions: + - feature_flag_config_write + - feature_flag_environment_config_read + /api/v2/feature-flags/{feature_flag_id}/archive: + post: + description: 'Archives a feature flag. Archived flags are + + hidden from the main list but remain accessible and can be unarchived.' + operationId: ArchiveFeatureFlag + parameters: + - $ref: '#/components/parameters/feature_flag_id' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FeatureFlagResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Archive a feature flag + tags: + - Feature Flags + x-permission: + operator: AND + permissions: + - feature_flag_config_write + - feature_flag_environment_config_read + /api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/disable: + post: + description: Disable a feature flag in a specific environment. + operationId: DisableFeatureFlagEnvironment + parameters: + - $ref: '#/components/parameters/feature_flag_id' + - $ref: '#/components/parameters/environment_id' + responses: + '200': + description: OK + '202': + description: Accepted - Approval required for this change + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Disable a feature flag in an environment + tags: + - Feature Flags + x-permission: + operator: AND + permissions: + - feature_flag_config_write + - feature_flag_environment_config_read + /api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/enable: + post: + description: Enable a feature flag in a specific environment. + operationId: EnableFeatureFlagEnvironment + parameters: + - $ref: '#/components/parameters/feature_flag_id' + - $ref: '#/components/parameters/environment_id' + responses: + '200': + description: OK + '202': + description: Accepted - Approval required for this change + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Enable a feature flag in an environment + tags: + - Feature Flags + x-permission: + operator: AND + permissions: + - feature_flag_config_write + - feature_flag_environment_config_read + /api/v2/feature-flags/{feature_flag_id}/unarchive: + post: + description: 'Unarchives a previously archived feature flag, + + making it visible in the main list again.' + operationId: UnarchiveFeatureFlag + parameters: + - $ref: '#/components/parameters/feature_flag_id' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FeatureFlagResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Unarchive a feature flag + tags: + - Feature Flags + x-permission: + operator: AND + permissions: + - feature_flag_config_write + - feature_flag_environment_config_read /api/v2/hamr: get: description: 'Retrieve the High Availability Multi-Region (HAMR) organization @@ -102212,6 +103462,13 @@ paths: get: description: Get the list of all critical assets. operationId: ListSecurityMonitoringCriticalAssets + parameters: + - description: Query string. + in: query + name: query + required: false + schema: + type: string responses: '200': content: @@ -111553,6 +112810,8 @@ tags: through the Datadog API. See the [Fastly integration page](https://docs.datadoghq.com/integrations/fastly/) for more information. name: Fastly Integration +- description: Manage feature flags and environments. + name: Feature Flags - description: 'Manage automated deployments across your fleet of hosts. diff --git a/cassettes/features/v2/feature_flags/Archive-a-feature-flag-returns-OK-response.frozen b/cassettes/features/v2/feature_flags/Archive-a-feature-flag-returns-OK-response.frozen new file mode 100644 index 000000000000..14c46496ac65 --- /dev/null +++ b/cassettes/features/v2/feature_flags/Archive-a-feature-flag-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-03-17T17:26:21.682Z \ No newline at end of file diff --git a/cassettes/features/v2/feature_flags/Archive-a-feature-flag-returns-OK-response.yml b/cassettes/features/v2/feature_flags/Archive-a-feature-flag-returns-OK-response.yml new file mode 100644 index 000000000000..2772540a3f64 --- /dev/null +++ b/cassettes/features/v2/feature_flags/Archive-a-feature-flag-returns-OK-response.yml @@ -0,0 +1,105 @@ +http_interactions: +- recorded_at: Tue, 17 Mar 2026 17:26:21 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"description":"Test feature flag for BDD scenarios","key":"test-feature-flag-Test-Archive_a_feature_flag_returns_OK_response-1773768381","name":"Test + Feature Flag Test-Archive_a_feature_flag_returns_OK_response-1773768381","value_type":"BOOLEAN","variants":[{"key":"variant-Test-Archive_a_feature_flag_returns_OK_response-1773768381-1","name":"Variant + Test-Archive_a_feature_flag_returns_OK_response-1773768381 A","value":"true"},{"key":"variant-Test-Archive_a_feature_flag_returns_OK_response-1773768381-2","name":"Variant + Test-Archive_a_feature_flag_returns_OK_response-1773768381 B","value":"false"}]},"type":"feature-flags"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/feature-flags + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"194c984e-34a0-4388-89d4-94a818312493","type":"feature-flags","attributes":{"archived_at":null,"created_at":"2026-03-17T17:26:21.863655Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"58f4eaa1-9868-40c4-927f-10c6bf2bd133","override_variant_id":null,"default_allocation_key":"allocation-default-a8a51d28e424","override_allocation_key":"allocation-override-a8a51d28e424","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"58f4eaa1-9868-40c4-927f-10c6bf2bd133","override_variant_id":null,"default_allocation_key":"allocation-default-f1974d82b5b7","override_allocation_key":"allocation-override-f1974d82b5b7","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Archive_a_feature_flag_returns_OK_response-1773768381","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Archive_a_feature_flag_returns_OK_response-1773768381","require_approval":false,"updated_at":"2026-03-17T17:26:21.863655Z","value_type":"BOOLEAN","variants":[{"id":"58f4eaa1-9868-40c4-927f-10c6bf2bd133","key":"variant-Test-Archive_a_feature_flag_returns_OK_response-1773768381-1","name":"Variant + Test-Archive_a_feature_flag_returns_OK_response-1773768381 A","value":"true","created_at":"2026-03-17T17:26:21.86806Z","updated_at":"2026-03-17T17:26:21.86806Z"},{"id":"9cda04ed-7ff3-4cf8-89ac-3f0e33b8f6e1","key":"variant-Test-Archive_a_feature_flag_returns_OK_response-1773768381-2","name":"Variant + Test-Archive_a_feature_flag_returns_OK_response-1773768381 B","value":"false","created_at":"2026-03-17T17:26:21.872328Z","updated_at":"2026-03-17T17:26:21.872328Z"}]}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Tue, 17 Mar 2026 17:26:21 GMT + request: + body: null + headers: + Accept: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/feature-flags/194c984e-34a0-4388-89d4-94a818312493/archive + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"194c984e-34a0-4388-89d4-94a818312493","type":"feature-flags","attributes":{"archived_at":"2026-03-17T17:26:22.178257Z","created_at":"2026-03-17T17:26:21.863655Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"58f4eaa1-9868-40c4-927f-10c6bf2bd133","override_variant_id":null,"default_allocation_key":"allocation-default-a8a51d28e424","override_allocation_key":"allocation-override-a8a51d28e424","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"58f4eaa1-9868-40c4-927f-10c6bf2bd133","override_variant_id":null,"default_allocation_key":"allocation-default-f1974d82b5b7","override_allocation_key":"allocation-override-f1974d82b5b7","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Archive_a_feature_flag_returns_OK_response-1773768381","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Archive_a_feature_flag_returns_OK_response-1773768381","require_approval":false,"updated_at":"2026-03-17T17:26:22.178257Z","value_type":"BOOLEAN","variants":[{"id":"58f4eaa1-9868-40c4-927f-10c6bf2bd133","key":"variant-Test-Archive_a_feature_flag_returns_OK_response-1773768381-1","name":"Variant + Test-Archive_a_feature_flag_returns_OK_response-1773768381 A","value":"true","created_at":"2026-03-17T17:26:21.86806Z","updated_at":"2026-03-17T17:26:21.86806Z"},{"id":"9cda04ed-7ff3-4cf8-89ac-3f0e33b8f6e1","key":"variant-Test-Archive_a_feature_flag_returns_OK_response-1773768381-2","name":"Variant + Test-Archive_a_feature_flag_returns_OK_response-1773768381 B","value":"false","created_at":"2026-03-17T17:26:21.872328Z","updated_at":"2026-03-17T17:26:21.872328Z"}]}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Tue, 17 Mar 2026 17:26:21 GMT + request: + body: null + headers: + Accept: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/feature-flags/194c984e-34a0-4388-89d4-94a818312493/unarchive + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"194c984e-34a0-4388-89d4-94a818312493","type":"feature-flags","attributes":{"archived_at":null,"created_at":"2026-03-17T17:26:21.863655Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"58f4eaa1-9868-40c4-927f-10c6bf2bd133","override_variant_id":null,"default_allocation_key":"allocation-default-a8a51d28e424","override_allocation_key":"allocation-override-a8a51d28e424","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"58f4eaa1-9868-40c4-927f-10c6bf2bd133","override_variant_id":null,"default_allocation_key":"allocation-default-f1974d82b5b7","override_allocation_key":"allocation-override-f1974d82b5b7","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Archive_a_feature_flag_returns_OK_response-1773768381","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Archive_a_feature_flag_returns_OK_response-1773768381","require_approval":false,"updated_at":"2026-03-17T17:26:22.541762Z","value_type":"BOOLEAN","variants":[{"id":"58f4eaa1-9868-40c4-927f-10c6bf2bd133","key":"variant-Test-Archive_a_feature_flag_returns_OK_response-1773768381-1","name":"Variant + Test-Archive_a_feature_flag_returns_OK_response-1773768381 A","value":"true","created_at":"2026-03-17T17:26:21.86806Z","updated_at":"2026-03-17T17:26:21.86806Z"},{"id":"9cda04ed-7ff3-4cf8-89ac-3f0e33b8f6e1","key":"variant-Test-Archive_a_feature_flag_returns_OK_response-1773768381-2","name":"Variant + Test-Archive_a_feature_flag_returns_OK_response-1773768381 B","value":"false","created_at":"2026-03-17T17:26:21.872328Z","updated_at":"2026-03-17T17:26:21.872328Z"}]}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Tue, 17 Mar 2026 17:26:21 GMT + request: + body: null + headers: + Accept: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/feature-flags/194c984e-34a0-4388-89d4-94a818312493/archive + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"194c984e-34a0-4388-89d4-94a818312493","type":"feature-flags","attributes":{"archived_at":"2026-03-17T17:26:22.921183Z","created_at":"2026-03-17T17:26:21.863655Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"58f4eaa1-9868-40c4-927f-10c6bf2bd133","override_variant_id":null,"default_allocation_key":"allocation-default-a8a51d28e424","override_allocation_key":"allocation-override-a8a51d28e424","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"58f4eaa1-9868-40c4-927f-10c6bf2bd133","override_variant_id":null,"default_allocation_key":"allocation-default-f1974d82b5b7","override_allocation_key":"allocation-override-f1974d82b5b7","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Archive_a_feature_flag_returns_OK_response-1773768381","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Archive_a_feature_flag_returns_OK_response-1773768381","require_approval":false,"updated_at":"2026-03-17T17:26:22.921183Z","value_type":"BOOLEAN","variants":[{"id":"58f4eaa1-9868-40c4-927f-10c6bf2bd133","key":"variant-Test-Archive_a_feature_flag_returns_OK_response-1773768381-1","name":"Variant + Test-Archive_a_feature_flag_returns_OK_response-1773768381 A","value":"true","created_at":"2026-03-17T17:26:21.86806Z","updated_at":"2026-03-17T17:26:21.86806Z"},{"id":"9cda04ed-7ff3-4cf8-89ac-3f0e33b8f6e1","key":"variant-Test-Archive_a_feature_flag_returns_OK_response-1773768381-2","name":"Variant + Test-Archive_a_feature_flag_returns_OK_response-1773768381 B","value":"false","created_at":"2026-03-17T17:26:21.872328Z","updated_at":"2026-03-17T17:26:21.872328Z"}]}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/feature_flags/Create-a-feature-flag-returns-Created-response.frozen b/cassettes/features/v2/feature_flags/Create-a-feature-flag-returns-Created-response.frozen new file mode 100644 index 000000000000..8078a87e24f2 --- /dev/null +++ b/cassettes/features/v2/feature_flags/Create-a-feature-flag-returns-Created-response.frozen @@ -0,0 +1 @@ +2026-03-17T17:26:23.134Z \ No newline at end of file diff --git a/cassettes/features/v2/feature_flags/Create-a-feature-flag-returns-Created-response.yml b/cassettes/features/v2/feature_flags/Create-a-feature-flag-returns-Created-response.yml new file mode 100644 index 000000000000..56cddd8cc99c --- /dev/null +++ b/cassettes/features/v2/feature_flags/Create-a-feature-flag-returns-Created-response.yml @@ -0,0 +1,58 @@ +http_interactions: +- recorded_at: Tue, 17 Mar 2026 17:26:23 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"default_variant_key":"variant-Test-Create_a_feature_flag_returns_Created_response-1773768383-1","description":"Test + feature flag for BDD scenarios","key":"test-feature-flag-Test-Create_a_feature_flag_returns_Created_response-1773768383","name":"Test + Feature Flag Test-Create_a_feature_flag_returns_Created_response-1773768383","value_type":"BOOLEAN","variants":[{"key":"variant-Test-Create_a_feature_flag_returns_Created_response-1773768383-1","name":"Variant + Test-Create_a_feature_flag_returns_Created_response-1773768383 A","value":"true"},{"key":"variant-Test-Create_a_feature_flag_returns_Created_response-1773768383-2","name":"Variant + Test-Create_a_feature_flag_returns_Created_response-1773768383 B","value":"false"}]},"type":"feature-flags"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/feature-flags + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"6fa35bee-ba95-4f15-b50d-c361e155f2ae","type":"feature-flags","attributes":{"archived_at":null,"created_at":"2026-03-17T17:26:23.233582Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"8cddd390-eb33-4430-a0e5-89134e033633","override_variant_id":null,"default_allocation_key":"allocation-default-61ba48eebc90","override_allocation_key":"allocation-override-61ba48eebc90","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"8cddd390-eb33-4430-a0e5-89134e033633","override_variant_id":null,"default_allocation_key":"allocation-default-2e4b491cac9c","override_allocation_key":"allocation-override-2e4b491cac9c","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Create_a_feature_flag_returns_Created_response-1773768383","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Create_a_feature_flag_returns_Created_response-1773768383","require_approval":false,"updated_at":"2026-03-17T17:26:23.233582Z","value_type":"BOOLEAN","variants":[{"id":"8cddd390-eb33-4430-a0e5-89134e033633","key":"variant-Test-Create_a_feature_flag_returns_Created_response-1773768383-1","name":"Variant + Test-Create_a_feature_flag_returns_Created_response-1773768383 A","value":"true","created_at":"2026-03-17T17:26:23.23848Z","updated_at":"2026-03-17T17:26:23.23848Z"},{"id":"62dcbb05-dad0-4fbb-ab67-d308ca03bec0","key":"variant-Test-Create_a_feature_flag_returns_Created_response-1773768383-2","name":"Variant + Test-Create_a_feature_flag_returns_Created_response-1773768383 B","value":"false","created_at":"2026-03-17T17:26:23.243558Z","updated_at":"2026-03-17T17:26:23.243558Z"}]}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Tue, 17 Mar 2026 17:26:23 GMT + request: + body: null + headers: + Accept: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/feature-flags/6fa35bee-ba95-4f15-b50d-c361e155f2ae/archive + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"6fa35bee-ba95-4f15-b50d-c361e155f2ae","type":"feature-flags","attributes":{"archived_at":"2026-03-17T17:26:23.573178Z","created_at":"2026-03-17T17:26:23.233582Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"8cddd390-eb33-4430-a0e5-89134e033633","override_variant_id":null,"default_allocation_key":"allocation-default-61ba48eebc90","override_allocation_key":"allocation-override-61ba48eebc90","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"8cddd390-eb33-4430-a0e5-89134e033633","override_variant_id":null,"default_allocation_key":"allocation-default-2e4b491cac9c","override_allocation_key":"allocation-override-2e4b491cac9c","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Create_a_feature_flag_returns_Created_response-1773768383","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Create_a_feature_flag_returns_Created_response-1773768383","require_approval":false,"updated_at":"2026-03-17T17:26:23.573178Z","value_type":"BOOLEAN","variants":[{"id":"8cddd390-eb33-4430-a0e5-89134e033633","key":"variant-Test-Create_a_feature_flag_returns_Created_response-1773768383-1","name":"Variant + Test-Create_a_feature_flag_returns_Created_response-1773768383 A","value":"true","created_at":"2026-03-17T17:26:23.23848Z","updated_at":"2026-03-17T17:26:23.23848Z"},{"id":"62dcbb05-dad0-4fbb-ab67-d308ca03bec0","key":"variant-Test-Create_a_feature_flag_returns_Created_response-1773768383-2","name":"Variant + Test-Create_a_feature_flag_returns_Created_response-1773768383 B","value":"false","created_at":"2026-03-17T17:26:23.243558Z","updated_at":"2026-03-17T17:26:23.243558Z"}]}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/feature_flags/Create-an-environment-returns-Created-response.frozen b/cassettes/features/v2/feature_flags/Create-an-environment-returns-Created-response.frozen new file mode 100644 index 000000000000..f005c53d0c46 --- /dev/null +++ b/cassettes/features/v2/feature_flags/Create-an-environment-returns-Created-response.frozen @@ -0,0 +1 @@ +2026-03-17T17:26:23.896Z \ No newline at end of file diff --git a/cassettes/features/v2/feature_flags/Create-an-environment-returns-Created-response.yml b/cassettes/features/v2/feature_flags/Create-an-environment-returns-Created-response.yml new file mode 100644 index 000000000000..691d018fdf73 --- /dev/null +++ b/cassettes/features/v2/feature_flags/Create-an-environment-returns-Created-response.yml @@ -0,0 +1,41 @@ +http_interactions: +- recorded_at: Tue, 17 Mar 2026 17:26:23 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"Test Environment Test-Create_an_environment_returns_Created_response-1773768383","queries":["test-Test-Create_an_environment_returns_Created_response-1773768383","env-Test-Create_an_environment_returns_Created_response-1773768383"]},"type":"environments"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/feature-flags/environments + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"b7fd5cfe-3350-4db5-9731-1702b2fc9ab7","type":"environments","attributes":{"is_production":false,"name":"Test + Environment Test-Create_an_environment_returns_Created_response-1773768383","queries":["test-Test-Create_an_environment_returns_Created_response-1773768383","env-Test-Create_an_environment_returns_Created_response-1773768383"],"require_feature_flag_approval":false}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Tue, 17 Mar 2026 17:26:23 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/feature-flags/environments/b7fd5cfe-3350-4db5-9731-1702b2fc9ab7 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/feature_flags/Get-a-feature-flag-returns-OK-response.frozen b/cassettes/features/v2/feature_flags/Get-a-feature-flag-returns-OK-response.frozen new file mode 100644 index 000000000000..a4d4291972c2 --- /dev/null +++ b/cassettes/features/v2/feature_flags/Get-a-feature-flag-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-03-17T17:26:24.320Z \ No newline at end of file diff --git a/cassettes/features/v2/feature_flags/Get-a-feature-flag-returns-OK-response.yml b/cassettes/features/v2/feature_flags/Get-a-feature-flag-returns-OK-response.yml new file mode 100644 index 000000000000..a7279a031243 --- /dev/null +++ b/cassettes/features/v2/feature_flags/Get-a-feature-flag-returns-OK-response.yml @@ -0,0 +1,81 @@ +http_interactions: +- recorded_at: Tue, 17 Mar 2026 17:26:24 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"description":"Test feature flag for BDD scenarios","key":"test-feature-flag-Test-Get_a_feature_flag_returns_OK_response-1773768384","name":"Test + Feature Flag Test-Get_a_feature_flag_returns_OK_response-1773768384","value_type":"BOOLEAN","variants":[{"key":"variant-Test-Get_a_feature_flag_returns_OK_response-1773768384-1","name":"Variant + Test-Get_a_feature_flag_returns_OK_response-1773768384 A","value":"true"},{"key":"variant-Test-Get_a_feature_flag_returns_OK_response-1773768384-2","name":"Variant + Test-Get_a_feature_flag_returns_OK_response-1773768384 B","value":"false"}]},"type":"feature-flags"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/feature-flags + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"e534f5d9-6883-4167-9695-00445005a23f","type":"feature-flags","attributes":{"archived_at":null,"created_at":"2026-03-17T17:26:24.476682Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"01acab73-99ca-4c28-96f1-56b2abc12275","override_variant_id":null,"default_allocation_key":"allocation-default-6bea15c01017","override_allocation_key":"allocation-override-6bea15c01017","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"01acab73-99ca-4c28-96f1-56b2abc12275","override_variant_id":null,"default_allocation_key":"allocation-default-f8960a34da10","override_allocation_key":"allocation-override-f8960a34da10","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Get_a_feature_flag_returns_OK_response-1773768384","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Get_a_feature_flag_returns_OK_response-1773768384","require_approval":false,"updated_at":"2026-03-17T17:26:24.476682Z","value_type":"BOOLEAN","variants":[{"id":"01acab73-99ca-4c28-96f1-56b2abc12275","key":"variant-Test-Get_a_feature_flag_returns_OK_response-1773768384-1","name":"Variant + Test-Get_a_feature_flag_returns_OK_response-1773768384 A","value":"true","created_at":"2026-03-17T17:26:24.479508Z","updated_at":"2026-03-17T17:26:24.479508Z"},{"id":"1889f1c9-961f-4202-aae1-ad8b3a8fe369","key":"variant-Test-Get_a_feature_flag_returns_OK_response-1773768384-2","name":"Variant + Test-Get_a_feature_flag_returns_OK_response-1773768384 B","value":"false","created_at":"2026-03-17T17:26:24.482785Z","updated_at":"2026-03-17T17:26:24.482785Z"}]}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Tue, 17 Mar 2026 17:26:24 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/feature-flags/e534f5d9-6883-4167-9695-00445005a23f + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"e534f5d9-6883-4167-9695-00445005a23f","type":"feature-flags","attributes":{"archived_at":null,"created_at":"2026-03-17T17:26:24.476682Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"01acab73-99ca-4c28-96f1-56b2abc12275","override_variant_id":null,"default_allocation_key":"allocation-default-6bea15c01017","override_allocation_key":"allocation-override-6bea15c01017","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"01acab73-99ca-4c28-96f1-56b2abc12275","override_variant_id":null,"default_allocation_key":"allocation-default-f8960a34da10","override_allocation_key":"allocation-override-f8960a34da10","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Get_a_feature_flag_returns_OK_response-1773768384","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Get_a_feature_flag_returns_OK_response-1773768384","require_approval":false,"updated_at":"2026-03-17T17:26:24.476682Z","value_type":"BOOLEAN","variants":[{"id":"01acab73-99ca-4c28-96f1-56b2abc12275","key":"variant-Test-Get_a_feature_flag_returns_OK_response-1773768384-1","name":"Variant + Test-Get_a_feature_flag_returns_OK_response-1773768384 A","value":"true","created_at":"2026-03-17T17:26:24.479508Z","updated_at":"2026-03-17T17:26:24.479508Z"},{"id":"1889f1c9-961f-4202-aae1-ad8b3a8fe369","key":"variant-Test-Get_a_feature_flag_returns_OK_response-1773768384-2","name":"Variant + Test-Get_a_feature_flag_returns_OK_response-1773768384 B","value":"false","created_at":"2026-03-17T17:26:24.482785Z","updated_at":"2026-03-17T17:26:24.482785Z"}]}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Tue, 17 Mar 2026 17:26:24 GMT + request: + body: null + headers: + Accept: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/feature-flags/e534f5d9-6883-4167-9695-00445005a23f/archive + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"e534f5d9-6883-4167-9695-00445005a23f","type":"feature-flags","attributes":{"archived_at":"2026-03-17T17:26:24.762691Z","created_at":"2026-03-17T17:26:24.476682Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"01acab73-99ca-4c28-96f1-56b2abc12275","override_variant_id":null,"default_allocation_key":"allocation-default-6bea15c01017","override_allocation_key":"allocation-override-6bea15c01017","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"01acab73-99ca-4c28-96f1-56b2abc12275","override_variant_id":null,"default_allocation_key":"allocation-default-f8960a34da10","override_allocation_key":"allocation-override-f8960a34da10","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Get_a_feature_flag_returns_OK_response-1773768384","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Get_a_feature_flag_returns_OK_response-1773768384","require_approval":false,"updated_at":"2026-03-17T17:26:24.762691Z","value_type":"BOOLEAN","variants":[{"id":"01acab73-99ca-4c28-96f1-56b2abc12275","key":"variant-Test-Get_a_feature_flag_returns_OK_response-1773768384-1","name":"Variant + Test-Get_a_feature_flag_returns_OK_response-1773768384 A","value":"true","created_at":"2026-03-17T17:26:24.479508Z","updated_at":"2026-03-17T17:26:24.479508Z"},{"id":"1889f1c9-961f-4202-aae1-ad8b3a8fe369","key":"variant-Test-Get_a_feature_flag_returns_OK_response-1773768384-2","name":"Variant + Test-Get_a_feature_flag_returns_OK_response-1773768384 B","value":"false","created_at":"2026-03-17T17:26:24.482785Z","updated_at":"2026-03-17T17:26:24.482785Z"}]}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/feature_flags/List-feature-flags-returns-OK-response.frozen b/cassettes/features/v2/feature_flags/List-feature-flags-returns-OK-response.frozen new file mode 100644 index 000000000000..47e50007c60f --- /dev/null +++ b/cassettes/features/v2/feature_flags/List-feature-flags-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-03-17T17:26:24.940Z \ No newline at end of file diff --git a/cassettes/features/v2/feature_flags/List-feature-flags-returns-OK-response.yml b/cassettes/features/v2/feature_flags/List-feature-flags-returns-OK-response.yml new file mode 100644 index 000000000000..519d622db810 --- /dev/null +++ b/cassettes/features/v2/feature_flags/List-feature-flags-returns-OK-response.yml @@ -0,0 +1,276 @@ +http_interactions: +- recorded_at: Tue, 17 Mar 2026 17:26:24 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/feature-flags + response: + body: + encoding: UTF-8 + string: '{"data":[{"id":"e534f5d9-6883-4167-9695-00445005a23f","type":"feature-flags","attributes":{"archived_at":"2026-03-17T17:26:24.762691Z","created_at":"2026-03-17T17:26:24.476682Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"01acab73-99ca-4c28-96f1-56b2abc12275","override_variant_id":null,"default_allocation_key":"allocation-default-6bea15c01017","override_allocation_key":"allocation-override-6bea15c01017","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"01acab73-99ca-4c28-96f1-56b2abc12275","override_variant_id":null,"default_allocation_key":"allocation-default-f8960a34da10","override_allocation_key":"allocation-override-f8960a34da10","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Get_a_feature_flag_returns_OK_response-1773768384","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Get_a_feature_flag_returns_OK_response-1773768384","require_approval":false,"updated_at":"2026-03-17T17:26:24.762691Z","value_type":"BOOLEAN","variants":[{"id":"01acab73-99ca-4c28-96f1-56b2abc12275","key":"variant-Test-Get_a_feature_flag_returns_OK_response-1773768384-1","name":"Variant + Test-Get_a_feature_flag_returns_OK_response-1773768384 A","value":"true","created_at":"2026-03-17T17:26:24.479508Z","updated_at":"2026-03-17T17:26:24.479508Z"},{"id":"1889f1c9-961f-4202-aae1-ad8b3a8fe369","key":"variant-Test-Get_a_feature_flag_returns_OK_response-1773768384-2","name":"Variant + Test-Get_a_feature_flag_returns_OK_response-1773768384 B","value":"false","created_at":"2026-03-17T17:26:24.482785Z","updated_at":"2026-03-17T17:26:24.482785Z"}]}},{"id":"6fa35bee-ba95-4f15-b50d-c361e155f2ae","type":"feature-flags","attributes":{"archived_at":"2026-03-17T17:26:23.573178Z","created_at":"2026-03-17T17:26:23.233582Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"8cddd390-eb33-4430-a0e5-89134e033633","override_variant_id":null,"default_allocation_key":"allocation-default-61ba48eebc90","override_allocation_key":"allocation-override-61ba48eebc90","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"8cddd390-eb33-4430-a0e5-89134e033633","override_variant_id":null,"default_allocation_key":"allocation-default-2e4b491cac9c","override_allocation_key":"allocation-override-2e4b491cac9c","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Create_a_feature_flag_returns_Created_response-1773768383","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Create_a_feature_flag_returns_Created_response-1773768383","require_approval":false,"updated_at":"2026-03-17T17:26:23.573178Z","value_type":"BOOLEAN","variants":[{"id":"8cddd390-eb33-4430-a0e5-89134e033633","key":"variant-Test-Create_a_feature_flag_returns_Created_response-1773768383-1","name":"Variant + Test-Create_a_feature_flag_returns_Created_response-1773768383 A","value":"true","created_at":"2026-03-17T17:26:23.23848Z","updated_at":"2026-03-17T17:26:23.23848Z"},{"id":"62dcbb05-dad0-4fbb-ab67-d308ca03bec0","key":"variant-Test-Create_a_feature_flag_returns_Created_response-1773768383-2","name":"Variant + Test-Create_a_feature_flag_returns_Created_response-1773768383 B","value":"false","created_at":"2026-03-17T17:26:23.243558Z","updated_at":"2026-03-17T17:26:23.243558Z"}]}},{"id":"194c984e-34a0-4388-89d4-94a818312493","type":"feature-flags","attributes":{"archived_at":"2026-03-17T17:26:22.921183Z","created_at":"2026-03-17T17:26:21.863655Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"58f4eaa1-9868-40c4-927f-10c6bf2bd133","override_variant_id":null,"default_allocation_key":"allocation-default-a8a51d28e424","override_allocation_key":"allocation-override-a8a51d28e424","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"58f4eaa1-9868-40c4-927f-10c6bf2bd133","override_variant_id":null,"default_allocation_key":"allocation-default-f1974d82b5b7","override_allocation_key":"allocation-override-f1974d82b5b7","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Archive_a_feature_flag_returns_OK_response-1773768381","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Archive_a_feature_flag_returns_OK_response-1773768381","require_approval":false,"updated_at":"2026-03-17T17:26:22.921183Z","value_type":"BOOLEAN","variants":[{"id":"58f4eaa1-9868-40c4-927f-10c6bf2bd133","key":"variant-Test-Archive_a_feature_flag_returns_OK_response-1773768381-1","name":"Variant + Test-Archive_a_feature_flag_returns_OK_response-1773768381 A","value":"true","created_at":"2026-03-17T17:26:21.86806Z","updated_at":"2026-03-17T17:26:21.86806Z"},{"id":"9cda04ed-7ff3-4cf8-89ac-3f0e33b8f6e1","key":"variant-Test-Archive_a_feature_flag_returns_OK_response-1773768381-2","name":"Variant + Test-Archive_a_feature_flag_returns_OK_response-1773768381 B","value":"false","created_at":"2026-03-17T17:26:21.872328Z","updated_at":"2026-03-17T17:26:21.872328Z"}]}},{"id":"201bdbf0-1c80-4660-95bf-cc30c7ce2401","type":"feature-flags","attributes":{"archived_at":"2026-03-17T15:08:57.257128Z","created_at":"2026-03-17T15:08:57.035045Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"12e38f0b-20a4-4ed3-b25f-61c34b54e47d","override_variant_id":null,"default_allocation_key":"allocation-default-351fbd61cc67","override_allocation_key":"allocation-override-351fbd61cc67","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"12e38f0b-20a4-4ed3-b25f-61c34b54e47d","override_variant_id":null,"default_allocation_key":"allocation-default-249549624198","override_allocation_key":"allocation-override-249549624198","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Update_a_feature_flag_returns_OK_response-1773760136","last_updated_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"Test + Feature Flag Test-Update_a_feature_flag_returns_OK_response-1773760136","require_approval":false,"updated_at":"2026-03-17T15:08:57.257128Z","value_type":"BOOLEAN","variants":[{"id":"12e38f0b-20a4-4ed3-b25f-61c34b54e47d","key":"variant-Test-Update_a_feature_flag_returns_OK_response-1773760136-1","name":"Variant + Test-Update_a_feature_flag_returns_OK_response-1773760136 A","value":"true","created_at":"2026-03-17T15:08:57.039839Z","updated_at":"2026-03-17T15:08:57.039839Z"},{"id":"e190d95f-1150-409c-9eb6-959b746bf452","key":"variant-Test-Update_a_feature_flag_returns_OK_response-1773760136-2","name":"Variant + Test-Update_a_feature_flag_returns_OK_response-1773760136 B","value":"false","created_at":"2026-03-17T15:08:57.044352Z","updated_at":"2026-03-17T15:08:57.044352Z"}]}},{"id":"eab9c92e-199c-4bc9-84f0-20551cd7cc4a","type":"feature-flags","attributes":{"archived_at":"2026-03-17T15:08:56.608346Z","created_at":"2026-03-17T15:08:56.398337Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"af3d3e5d-6cc7-4b05-8964-a707e48ea198","override_variant_id":null,"default_allocation_key":"allocation-default-b33799d7bae7","override_allocation_key":"allocation-override-b33799d7bae7","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"af3d3e5d-6cc7-4b05-8964-a707e48ea198","override_variant_id":null,"default_allocation_key":"allocation-default-4cb65fb41004","override_allocation_key":"allocation-override-4cb65fb41004","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Get_a_feature_flag_returns_OK_response-1773760136","last_updated_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"Test + Feature Flag Test-Get_a_feature_flag_returns_OK_response-1773760136","require_approval":false,"updated_at":"2026-03-17T15:08:56.608346Z","value_type":"BOOLEAN","variants":[{"id":"af3d3e5d-6cc7-4b05-8964-a707e48ea198","key":"variant-Test-Get_a_feature_flag_returns_OK_response-1773760136-1","name":"Variant + Test-Get_a_feature_flag_returns_OK_response-1773760136 A","value":"true","created_at":"2026-03-17T15:08:56.40304Z","updated_at":"2026-03-17T15:08:56.40304Z"},{"id":"39e6b5b6-6c35-4dfc-9dd7-66398c392155","key":"variant-Test-Get_a_feature_flag_returns_OK_response-1773760136-2","name":"Variant + Test-Get_a_feature_flag_returns_OK_response-1773760136 B","value":"false","created_at":"2026-03-17T15:08:56.407701Z","updated_at":"2026-03-17T15:08:56.407701Z"}]}},{"id":"9a3ce628-9519-4b66-8c7b-66b876aa06f5","type":"feature-flags","attributes":{"archived_at":"2026-03-17T15:08:55.931129Z","created_at":"2026-03-17T15:08:55.625956Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"207f0378-5e66-4dbe-8cc3-c24c08a2bf7a","override_variant_id":null,"default_allocation_key":"allocation-default-35f6338b1693","override_allocation_key":"allocation-override-35f6338b1693","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"207f0378-5e66-4dbe-8cc3-c24c08a2bf7a","override_variant_id":null,"default_allocation_key":"allocation-default-c7b8d27ca798","override_allocation_key":"allocation-override-c7b8d27ca798","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Archive_a_feature_flag_returns_OK_response-1773760134","last_updated_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"Test + Feature Flag Test-Archive_a_feature_flag_returns_OK_response-1773760134","require_approval":false,"updated_at":"2026-03-17T15:08:55.931129Z","value_type":"BOOLEAN","variants":[{"id":"207f0378-5e66-4dbe-8cc3-c24c08a2bf7a","key":"variant-Test-Archive_a_feature_flag_returns_OK_response-1773760134-1","name":"Variant + Test-Archive_a_feature_flag_returns_OK_response-1773760134 A","value":"true","created_at":"2026-03-17T15:08:55.632964Z","updated_at":"2026-03-17T15:08:55.632964Z"},{"id":"cb77f2cf-2cff-47a4-bb45-06269f7f0caa","key":"variant-Test-Archive_a_feature_flag_returns_OK_response-1773760134-2","name":"Variant + Test-Archive_a_feature_flag_returns_OK_response-1773760134 B","value":"false","created_at":"2026-03-17T15:08:55.638427Z","updated_at":"2026-03-17T15:08:55.638427Z"}]}},{"id":"7dc4f6d7-e9d0-4185-b5f0-7b9db2e78eda","type":"feature-flags","attributes":{"archived_at":"2026-03-13T19:20:52.438694Z","created_at":"2026-03-13T19:20:51.50037Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Updated + description for the feature flag","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"06f16f9c-a9bb-47d9-8a2a-619533d36d5e","override_variant_id":null,"default_allocation_key":"allocation-default-88187e7b6e51","override_allocation_key":"allocation-override-88187e7b6e51","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"06f16f9c-a9bb-47d9-8a2a-619533d36d5e","override_variant_id":null,"default_allocation_key":"allocation-default-10ba6fd58e8d","override_allocation_key":"allocation-override-10ba6fd58e8d","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Update_a_feature_flag_returns_OK_response-1773429651","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Updated + Test Feature Flag Test-Update_a_feature_flag_returns_OK_response-1773429651","require_approval":false,"updated_at":"2026-03-13T19:20:52.438694Z","value_type":"BOOLEAN","variants":[{"id":"06f16f9c-a9bb-47d9-8a2a-619533d36d5e","key":"variant-Test-Update_a_feature_flag_returns_OK_response-1773429651-1","name":"Variant + Test-Update_a_feature_flag_returns_OK_response-1773429651 A","value":"true","created_at":"2026-03-13T19:20:51.505338Z","updated_at":"2026-03-13T19:20:51.505338Z"},{"id":"2d024126-2526-4d3a-9dc5-11df237a4ad6","key":"variant-Test-Update_a_feature_flag_returns_OK_response-1773429651-2","name":"Variant + Test-Update_a_feature_flag_returns_OK_response-1773429651 B","value":"false","created_at":"2026-03-13T19:20:51.510522Z","updated_at":"2026-03-13T19:20:51.510522Z"}]}},{"id":"ab8ed7a2-1f14-4bed-9f9d-6e81cbbd6119","type":"feature-flags","attributes":{"archived_at":"2026-03-13T19:20:50.696628Z","created_at":"2026-03-13T19:20:50.025005Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"bb9b6386-477d-483b-b971-6aa0ce56c947","override_variant_id":null,"default_allocation_key":"allocation-default-af658c22b724","override_allocation_key":"allocation-override-af658c22b724","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"bb9b6386-477d-483b-b971-6aa0ce56c947","override_variant_id":null,"default_allocation_key":"allocation-default-df870b1a44d6","override_allocation_key":"allocation-override-df870b1a44d6","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Get_a_feature_flag_returns_OK_response-1773429649","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Get_a_feature_flag_returns_OK_response-1773429649","require_approval":false,"updated_at":"2026-03-13T19:20:50.696628Z","value_type":"BOOLEAN","variants":[{"id":"bb9b6386-477d-483b-b971-6aa0ce56c947","key":"variant-Test-Get_a_feature_flag_returns_OK_response-1773429649-1","name":"Variant + Test-Get_a_feature_flag_returns_OK_response-1773429649 A","value":"true","created_at":"2026-03-13T19:20:50.029758Z","updated_at":"2026-03-13T19:20:50.029758Z"},{"id":"e867fa19-8d94-4985-a91d-16ae56ba0dae","key":"variant-Test-Get_a_feature_flag_returns_OK_response-1773429649-2","name":"Variant + Test-Get_a_feature_flag_returns_OK_response-1773429649 B","value":"false","created_at":"2026-03-13T19:20:50.034524Z","updated_at":"2026-03-13T19:20:50.034524Z"}]}},{"id":"d0692b6c-d099-4311-aa06-ece56f0404ce","type":"feature-flags","attributes":{"archived_at":"2026-03-13T19:20:48.748098Z","created_at":"2026-03-13T19:20:48.31821Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"350a67c9-7f99-4a54-a0b4-6e816073de44","override_variant_id":null,"default_allocation_key":"allocation-default-13d5cca82e36","override_allocation_key":"allocation-override-13d5cca82e36","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"350a67c9-7f99-4a54-a0b4-6e816073de44","override_variant_id":null,"default_allocation_key":"allocation-default-83d5e3e7be2c","override_allocation_key":"allocation-override-83d5e3e7be2c","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Create_a_feature_flag_returns_Created_response-1773429647","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Create_a_feature_flag_returns_Created_response-1773429647","require_approval":false,"updated_at":"2026-03-13T19:20:48.748098Z","value_type":"BOOLEAN","variants":[{"id":"350a67c9-7f99-4a54-a0b4-6e816073de44","key":"variant-Test-Create_a_feature_flag_returns_Created_response-1773429647-1","name":"Variant + Test-Create_a_feature_flag_returns_Created_response-1773429647 A","value":"true","created_at":"2026-03-13T19:20:48.323062Z","updated_at":"2026-03-13T19:20:48.323062Z"},{"id":"93a50632-e7c5-4cfa-bd7d-49dd6fa480ee","key":"variant-Test-Create_a_feature_flag_returns_Created_response-1773429647-2","name":"Variant + Test-Create_a_feature_flag_returns_Created_response-1773429647 B","value":"false","created_at":"2026-03-13T19:20:48.328149Z","updated_at":"2026-03-13T19:20:48.328149Z"}]}},{"id":"a6334abf-af4c-45f4-a5da-9906bf2d5ab3","type":"feature-flags","attributes":{"archived_at":"2026-03-13T19:20:47.574492Z","created_at":"2026-03-13T19:20:46.170014Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"2251f13b-addb-4015-b4ec-f0b9e0517de2","override_variant_id":null,"default_allocation_key":"allocation-default-ddf49525f4d2","override_allocation_key":"allocation-override-ddf49525f4d2","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"2251f13b-addb-4015-b4ec-f0b9e0517de2","override_variant_id":null,"default_allocation_key":"allocation-default-f76229e13e34","override_allocation_key":"allocation-override-f76229e13e34","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Archive_a_feature_flag_returns_OK_response-1773429645","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Archive_a_feature_flag_returns_OK_response-1773429645","require_approval":false,"updated_at":"2026-03-13T19:20:47.574492Z","value_type":"BOOLEAN","variants":[{"id":"2251f13b-addb-4015-b4ec-f0b9e0517de2","key":"variant-Test-Archive_a_feature_flag_returns_OK_response-1773429645-1","name":"Variant + Test-Archive_a_feature_flag_returns_OK_response-1773429645 A","value":"true","created_at":"2026-03-13T19:20:46.176771Z","updated_at":"2026-03-13T19:20:46.176771Z"},{"id":"da742de9-5ac7-4352-bf78-0e4ea73b4cca","key":"variant-Test-Archive_a_feature_flag_returns_OK_response-1773429645-2","name":"Variant + Test-Archive_a_feature_flag_returns_OK_response-1773429645 B","value":"false","created_at":"2026-03-13T19:20:46.182512Z","updated_at":"2026-03-13T19:20:46.182512Z"}]}},{"id":"173d224a-6400-4677-9e8e-5aa20a94fcae","type":"feature-flags","attributes":{"archived_at":"2026-03-12T13:49:05.555164Z","created_at":"2026-03-12T13:49:05.026326Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Updated + description for the feature flag","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"d51ad06c-f0ba-42a6-a889-144de626e1e3","override_variant_id":null,"default_allocation_key":"allocation-default-6851fe2abd67","override_allocation_key":"allocation-override-6851fe2abd67","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"d51ad06c-f0ba-42a6-a889-144de626e1e3","override_variant_id":null,"default_allocation_key":"allocation-default-e30e5bf098a3","override_allocation_key":"allocation-override-e30e5bf098a3","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Typescript-Update_a_feature_flag_returns_OK_response-1773323344","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Updated + Test Feature Flag Test-Typescript-Update_a_feature_flag_returns_OK_response-1773323344","require_approval":false,"updated_at":"2026-03-12T13:49:05.555164Z","value_type":"BOOLEAN","variants":[{"id":"d51ad06c-f0ba-42a6-a889-144de626e1e3","key":"variant-Test-Typescript-Update_a_feature_flag_returns_OK_response-1773323344-1","name":"Variant + Test-Typescript-Update_a_feature_flag_returns_OK_response-1773323344 A","value":"true","created_at":"2026-03-12T13:49:05.031021Z","updated_at":"2026-03-12T13:49:05.031021Z"},{"id":"3324cbaa-21ed-4977-a2ec-0cff602ede43","key":"variant-Test-Typescript-Update_a_feature_flag_returns_OK_response-1773323344-2","name":"Variant + Test-Typescript-Update_a_feature_flag_returns_OK_response-1773323344 B","value":"false","created_at":"2026-03-12T13:49:05.035596Z","updated_at":"2026-03-12T13:49:05.035596Z"}]}},{"id":"2aefffce-cb05-453c-9577-337cd8de16cd","type":"feature-flags","attributes":{"archived_at":"2026-03-12T13:49:04.563057Z","created_at":"2026-03-12T13:49:04.167214Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"10f3f194-64b5-4543-9eb1-bf2d7d4626d3","override_variant_id":null,"default_allocation_key":"allocation-default-78828809a780","override_allocation_key":"allocation-override-78828809a780","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"10f3f194-64b5-4543-9eb1-bf2d7d4626d3","override_variant_id":null,"default_allocation_key":"allocation-default-83df2d008fa8","override_allocation_key":"allocation-override-83df2d008fa8","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Typescript-Get_a_feature_flag_returns_OK_response-1773323343","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Typescript-Get_a_feature_flag_returns_OK_response-1773323343","require_approval":false,"updated_at":"2026-03-12T13:49:04.563057Z","value_type":"BOOLEAN","variants":[{"id":"10f3f194-64b5-4543-9eb1-bf2d7d4626d3","key":"variant-Test-Typescript-Get_a_feature_flag_returns_OK_response-1773323343-1","name":"Variant + Test-Typescript-Get_a_feature_flag_returns_OK_response-1773323343 A","value":"true","created_at":"2026-03-12T13:49:04.173174Z","updated_at":"2026-03-12T13:49:04.173174Z"},{"id":"9929e94b-d0a2-4523-a052-66685dac6541","key":"variant-Test-Typescript-Get_a_feature_flag_returns_OK_response-1773323343-2","name":"Variant + Test-Typescript-Get_a_feature_flag_returns_OK_response-1773323343 B","value":"false","created_at":"2026-03-12T13:49:04.178659Z","updated_at":"2026-03-12T13:49:04.178659Z"}]}},{"id":"5484a62d-afef-46cf-93a1-232d29c399d8","type":"feature-flags","attributes":{"archived_at":"2026-03-12T13:49:03.377158Z","created_at":"2026-03-12T13:49:03.083348Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"fdfe0dd2-5568-4557-9ddf-268ddf0ff375","override_variant_id":null,"default_allocation_key":"allocation-default-940dcb6aa56e","override_allocation_key":"allocation-override-940dcb6aa56e","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"fdfe0dd2-5568-4557-9ddf-268ddf0ff375","override_variant_id":null,"default_allocation_key":"allocation-default-4f4a2d214725","override_allocation_key":"allocation-override-4f4a2d214725","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Typescript-Create_a_feature_flag_returns_Created_response-1773323342","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Typescript-Create_a_feature_flag_returns_Created_response-1773323342","require_approval":false,"updated_at":"2026-03-12T13:49:03.377158Z","value_type":"BOOLEAN","variants":[{"id":"fdfe0dd2-5568-4557-9ddf-268ddf0ff375","key":"variant-Test-Typescript-Create_a_feature_flag_returns_Created_response-1773323342-1","name":"Variant + Test-Typescript-Create_a_feature_flag_returns_Created_response-1773323342 + A","value":"true","created_at":"2026-03-12T13:49:03.089739Z","updated_at":"2026-03-12T13:49:03.089739Z"},{"id":"eec95a5d-c74c-4064-9c5f-bbe1178e63fd","key":"variant-Test-Typescript-Create_a_feature_flag_returns_Created_response-1773323342-2","name":"Variant + Test-Typescript-Create_a_feature_flag_returns_Created_response-1773323342 + B","value":"false","created_at":"2026-03-12T13:49:03.095502Z","updated_at":"2026-03-12T13:49:03.095502Z"}]}},{"id":"28f766de-b389-4f27-8288-7d9ef1119039","type":"feature-flags","attributes":{"archived_at":"2026-03-12T13:49:02.75851Z","created_at":"2026-03-12T13:49:01.969907Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"5f312336-9d12-4944-93ce-e2464ecdfcf5","override_variant_id":null,"default_allocation_key":"allocation-default-ef26dc74afc1","override_allocation_key":"allocation-override-ef26dc74afc1","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"5f312336-9d12-4944-93ce-e2464ecdfcf5","override_variant_id":null,"default_allocation_key":"allocation-default-bcccf2a8d98b","override_allocation_key":"allocation-override-bcccf2a8d98b","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773323341","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773323341","require_approval":false,"updated_at":"2026-03-12T13:49:02.75851Z","value_type":"BOOLEAN","variants":[{"id":"5f312336-9d12-4944-93ce-e2464ecdfcf5","key":"variant-Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773323341-1","name":"Variant + Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773323341 A","value":"true","created_at":"2026-03-12T13:49:01.976745Z","updated_at":"2026-03-12T13:49:01.976745Z"},{"id":"11a385a4-3651-4097-a745-35b2b81fdd8b","key":"variant-Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773323341-2","name":"Variant + Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773323341 B","value":"false","created_at":"2026-03-12T13:49:01.98373Z","updated_at":"2026-03-12T13:49:01.98373Z"}]}},{"id":"b0c0b541-7549-40ef-89bc-040fbf823e05","type":"feature-flags","attributes":{"archived_at":"2026-03-12T13:48:15.234733Z","created_at":"2026-03-12T13:48:14.775626Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Updated + description for the feature flag","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"3b965c85-3a97-40bf-9a2e-f06c8c9a11dc","override_variant_id":null,"default_allocation_key":"allocation-default-3bb2c180b14a","override_allocation_key":"allocation-override-3bb2c180b14a","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"3b965c85-3a97-40bf-9a2e-f06c8c9a11dc","override_variant_id":null,"default_allocation_key":"allocation-default-5eae473d48e8","override_allocation_key":"allocation-override-5eae473d48e8","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Update_a_feature_flag_returns_OK_response-1773323294","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Updated + Test Feature Flag Test-Update_a_feature_flag_returns_OK_response-1773323294","require_approval":false,"updated_at":"2026-03-12T13:48:15.234733Z","value_type":"BOOLEAN","variants":[{"id":"3b965c85-3a97-40bf-9a2e-f06c8c9a11dc","key":"variant-Test-Update_a_feature_flag_returns_OK_response-1773323294-1","name":"Variant + Test-Update_a_feature_flag_returns_OK_response-1773323294 A","value":"true","created_at":"2026-03-12T13:48:14.7803Z","updated_at":"2026-03-12T13:48:14.7803Z"},{"id":"13387543-5f87-4ac2-bdf5-408b5b58a208","key":"variant-Test-Update_a_feature_flag_returns_OK_response-1773323294-2","name":"Variant + Test-Update_a_feature_flag_returns_OK_response-1773323294 B","value":"false","created_at":"2026-03-12T13:48:14.785248Z","updated_at":"2026-03-12T13:48:14.785248Z"}]}},{"id":"59bd115c-500a-4dbd-a770-d9d5829e5d6a","type":"feature-flags","attributes":{"archived_at":"2026-03-12T13:48:14.3091Z","created_at":"2026-03-12T13:48:13.926176Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"45a3942c-d14e-4761-8a4f-f5bb02e63b68","override_variant_id":null,"default_allocation_key":"allocation-default-ac5e7a87ec55","override_allocation_key":"allocation-override-ac5e7a87ec55","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"45a3942c-d14e-4761-8a4f-f5bb02e63b68","override_variant_id":null,"default_allocation_key":"allocation-default-3e00655483cd","override_allocation_key":"allocation-override-3e00655483cd","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Get_a_feature_flag_returns_OK_response-1773323293","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Get_a_feature_flag_returns_OK_response-1773323293","require_approval":false,"updated_at":"2026-03-12T13:48:14.3091Z","value_type":"BOOLEAN","variants":[{"id":"45a3942c-d14e-4761-8a4f-f5bb02e63b68","key":"variant-Test-Get_a_feature_flag_returns_OK_response-1773323293-1","name":"Variant + Test-Get_a_feature_flag_returns_OK_response-1773323293 A","value":"true","created_at":"2026-03-12T13:48:13.930949Z","updated_at":"2026-03-12T13:48:13.930949Z"},{"id":"43e96383-b555-47d1-bc48-a6719703b23a","key":"variant-Test-Get_a_feature_flag_returns_OK_response-1773323293-2","name":"Variant + Test-Get_a_feature_flag_returns_OK_response-1773323293 B","value":"false","created_at":"2026-03-12T13:48:13.935301Z","updated_at":"2026-03-12T13:48:13.935301Z"}]}},{"id":"55694d1f-0ecf-457b-8765-1075c5182ec4","type":"feature-flags","attributes":{"archived_at":"2026-03-12T13:48:13.084527Z","created_at":"2026-03-12T13:48:12.787529Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"cddba14c-e97e-4b2e-9eaa-52c23dbcc691","override_variant_id":null,"default_allocation_key":"allocation-default-98b1ea18f09d","override_allocation_key":"allocation-override-98b1ea18f09d","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"cddba14c-e97e-4b2e-9eaa-52c23dbcc691","override_variant_id":null,"default_allocation_key":"allocation-default-5843fabb9120","override_allocation_key":"allocation-override-5843fabb9120","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Create_a_feature_flag_returns_Created_response-1773323292","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Create_a_feature_flag_returns_Created_response-1773323292","require_approval":false,"updated_at":"2026-03-12T13:48:13.084527Z","value_type":"BOOLEAN","variants":[{"id":"cddba14c-e97e-4b2e-9eaa-52c23dbcc691","key":"variant-Test-Create_a_feature_flag_returns_Created_response-1773323292-1","name":"Variant + Test-Create_a_feature_flag_returns_Created_response-1773323292 A","value":"true","created_at":"2026-03-12T13:48:12.791897Z","updated_at":"2026-03-12T13:48:12.791897Z"},{"id":"423fefd9-874c-410f-8617-cf91be28226d","key":"variant-Test-Create_a_feature_flag_returns_Created_response-1773323292-2","name":"Variant + Test-Create_a_feature_flag_returns_Created_response-1773323292 B","value":"false","created_at":"2026-03-12T13:48:12.796927Z","updated_at":"2026-03-12T13:48:12.796927Z"}]}},{"id":"64b9acee-69a6-429f-bf3b-e8591def9a28","type":"feature-flags","attributes":{"archived_at":"2026-03-12T13:48:12.520657Z","created_at":"2026-03-12T13:48:11.603943Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"4d3177b9-15f9-427c-907e-6c8b2f0b8ad2","override_variant_id":null,"default_allocation_key":"allocation-default-596d031ae077","override_allocation_key":"allocation-override-596d031ae077","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"4d3177b9-15f9-427c-907e-6c8b2f0b8ad2","override_variant_id":null,"default_allocation_key":"allocation-default-164ee56390fc","override_allocation_key":"allocation-override-164ee56390fc","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Archive_a_feature_flag_returns_OK_response-1773323291","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Archive_a_feature_flag_returns_OK_response-1773323291","require_approval":false,"updated_at":"2026-03-12T13:48:12.520657Z","value_type":"BOOLEAN","variants":[{"id":"4d3177b9-15f9-427c-907e-6c8b2f0b8ad2","key":"variant-Test-Archive_a_feature_flag_returns_OK_response-1773323291-1","name":"Variant + Test-Archive_a_feature_flag_returns_OK_response-1773323291 A","value":"true","created_at":"2026-03-12T13:48:11.611055Z","updated_at":"2026-03-12T13:48:11.611055Z"},{"id":"40ebd34c-ce19-45cb-99e0-ef84af768b77","key":"variant-Test-Archive_a_feature_flag_returns_OK_response-1773323291-2","name":"Variant + Test-Archive_a_feature_flag_returns_OK_response-1773323291 B","value":"false","created_at":"2026-03-12T13:48:11.616674Z","updated_at":"2026-03-12T13:48:11.616674Z"}]}},{"id":"c0ca7995-4ba7-4263-8526-4e27dc050e19","type":"feature-flags","attributes":{"archived_at":"2026-03-12T13:37:26.996021Z","created_at":"2026-03-12T13:37:26.513284Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Updated + description for the feature flag","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"502ba420-4a65-4fbb-ac9f-37b1330de706","override_variant_id":null,"default_allocation_key":"allocation-default-ae5bf74294fb","override_allocation_key":"allocation-override-ae5bf74294fb","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"502ba420-4a65-4fbb-ac9f-37b1330de706","override_variant_id":null,"default_allocation_key":"allocation-default-db47f795ca48","override_allocation_key":"allocation-override-db47f795ca48","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Typescript-Update_a_feature_flag_returns_OK_response-1773322646","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Updated + Test Feature Flag Test-Typescript-Update_a_feature_flag_returns_OK_response-1773322646","require_approval":false,"updated_at":"2026-03-12T13:37:26.996021Z","value_type":"BOOLEAN","variants":[{"id":"502ba420-4a65-4fbb-ac9f-37b1330de706","key":"variant-Test-Typescript-Update_a_feature_flag_returns_OK_response-1773322646-1","name":"Variant + Test-Typescript-Update_a_feature_flag_returns_OK_response-1773322646 A","value":"true","created_at":"2026-03-12T13:37:26.519774Z","updated_at":"2026-03-12T13:37:26.519774Z"},{"id":"31e7b908-2a21-4f0d-8294-20daf3017499","key":"variant-Test-Typescript-Update_a_feature_flag_returns_OK_response-1773322646-2","name":"Variant + Test-Typescript-Update_a_feature_flag_returns_OK_response-1773322646 B","value":"false","created_at":"2026-03-12T13:37:26.5259Z","updated_at":"2026-03-12T13:37:26.5259Z"}]}},{"id":"66ff7dd8-ae9f-4054-811f-31cbc1764ce3","type":"feature-flags","attributes":{"archived_at":"2026-03-12T13:37:26.234873Z","created_at":"2026-03-12T13:37:25.860537Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"f12ee573-3d7c-45df-b44c-04bd1a017230","override_variant_id":null,"default_allocation_key":"allocation-default-6cefeac941a7","override_allocation_key":"allocation-override-6cefeac941a7","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"f12ee573-3d7c-45df-b44c-04bd1a017230","override_variant_id":null,"default_allocation_key":"allocation-default-436103151bc8","override_allocation_key":"allocation-override-436103151bc8","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Typescript-Unarchive_a_feature_flag_returns_OK_response-1773322645","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Typescript-Unarchive_a_feature_flag_returns_OK_response-1773322645","require_approval":false,"updated_at":"2026-03-12T13:37:26.234873Z","value_type":"BOOLEAN","variants":[{"id":"f12ee573-3d7c-45df-b44c-04bd1a017230","key":"variant-Test-Typescript-Unarchive_a_feature_flag_returns_OK_response-1773322645-1","name":"Variant + Test-Typescript-Unarchive_a_feature_flag_returns_OK_response-1773322645 A","value":"true","created_at":"2026-03-12T13:37:25.86685Z","updated_at":"2026-03-12T13:37:25.86685Z"},{"id":"552b341c-716f-4c2e-af25-3ee52da7b915","key":"variant-Test-Typescript-Unarchive_a_feature_flag_returns_OK_response-1773322645-2","name":"Variant + Test-Typescript-Unarchive_a_feature_flag_returns_OK_response-1773322645 B","value":"false","created_at":"2026-03-12T13:37:25.872916Z","updated_at":"2026-03-12T13:37:25.872916Z"}]}},{"id":"934e15fa-1c36-405f-90e7-566d01bfabf9","type":"feature-flags","attributes":{"archived_at":"2026-03-12T13:37:25.520279Z","created_at":"2026-03-12T13:37:25.133654Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"61cdc701-e9e1-4b70-aeb6-31dcda9aee59","override_variant_id":null,"default_allocation_key":"allocation-default-f395401aa479","override_allocation_key":"allocation-override-f395401aa479","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"61cdc701-e9e1-4b70-aeb6-31dcda9aee59","override_variant_id":null,"default_allocation_key":"allocation-default-bfe69c37a0df","override_allocation_key":"allocation-override-bfe69c37a0df","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322644","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322644","require_approval":false,"updated_at":"2026-03-12T13:37:25.520279Z","value_type":"BOOLEAN","variants":[{"id":"61cdc701-e9e1-4b70-aeb6-31dcda9aee59","key":"variant-Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322644-1","name":"Variant + Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322644 A","value":"true","created_at":"2026-03-12T13:37:25.141637Z","updated_at":"2026-03-12T13:37:25.141637Z"},{"id":"a96b8e1a-6dce-4a8a-9e99-b4971c1144d8","key":"variant-Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322644-2","name":"Variant + Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322644 B","value":"false","created_at":"2026-03-12T13:37:25.147213Z","updated_at":"2026-03-12T13:37:25.147213Z"}]}},{"id":"649cf64b-3319-4068-a811-e34dcca65a9e","type":"feature-flags","attributes":{"archived_at":"2026-03-12T13:37:24.262463Z","created_at":"2026-03-12T13:37:23.95992Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"3b088710-98d0-4229-a0c2-2b2fc33cb432","override_variant_id":null,"default_allocation_key":"allocation-default-b2ad57f61640","override_allocation_key":"allocation-override-b2ad57f61640","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"3b088710-98d0-4229-a0c2-2b2fc33cb432","override_variant_id":null,"default_allocation_key":"allocation-default-5fc1041f29f2","override_allocation_key":"allocation-override-5fc1041f29f2","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322643","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322643","require_approval":false,"updated_at":"2026-03-12T13:37:24.262463Z","value_type":"BOOLEAN","variants":[{"id":"3b088710-98d0-4229-a0c2-2b2fc33cb432","key":"variant-Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322643-1","name":"Variant + Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322643 + A","value":"true","created_at":"2026-03-12T13:37:23.964217Z","updated_at":"2026-03-12T13:37:23.964217Z"},{"id":"f7401bd2-09ec-4a84-94f8-e5d5e6324464","key":"variant-Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322643-2","name":"Variant + Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322643 + B","value":"false","created_at":"2026-03-12T13:37:23.968881Z","updated_at":"2026-03-12T13:37:23.968881Z"}]}},{"id":"31fc8390-46c7-45ba-a73e-022fa3ec1978","type":"feature-flags","attributes":{"archived_at":"2026-03-12T13:37:23.66621Z","created_at":"2026-03-12T13:37:23.013799Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"20dc24ee-b02a-4983-872e-f4472613987b","override_variant_id":null,"default_allocation_key":"allocation-default-6ebf32d824fb","override_allocation_key":"allocation-override-6ebf32d824fb","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"20dc24ee-b02a-4983-872e-f4472613987b","override_variant_id":null,"default_allocation_key":"allocation-default-a2eeb96ed627","override_allocation_key":"allocation-override-a2eeb96ed627","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322642","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322642","require_approval":false,"updated_at":"2026-03-12T13:37:23.66621Z","value_type":"BOOLEAN","variants":[{"id":"20dc24ee-b02a-4983-872e-f4472613987b","key":"variant-Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322642-1","name":"Variant + Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322642 A","value":"true","created_at":"2026-03-12T13:37:23.018388Z","updated_at":"2026-03-12T13:37:23.018388Z"},{"id":"34f79e9c-8323-4f5d-b180-57c1639546d1","key":"variant-Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322642-2","name":"Variant + Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322642 B","value":"false","created_at":"2026-03-12T13:37:23.022712Z","updated_at":"2026-03-12T13:37:23.022712Z"}]}},{"id":"cf10259e-0961-4e83-aa5a-23399693ed2d","type":"feature-flags","attributes":{"archived_at":"2026-03-12T13:37:04.551098Z","created_at":"2026-03-12T13:37:04.254615Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"e6521d4d-53c6-4a83-a772-2e48a9660641","override_variant_id":null,"default_allocation_key":"allocation-default-adb6e39257cb","override_allocation_key":"allocation-override-adb6e39257cb","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"e6521d4d-53c6-4a83-a772-2e48a9660641","override_variant_id":null,"default_allocation_key":"allocation-default-5b1113f8c525","override_allocation_key":"allocation-override-5b1113f8c525","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322624","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322624","require_approval":false,"updated_at":"2026-03-12T13:37:04.551098Z","value_type":"BOOLEAN","variants":[{"id":"e6521d4d-53c6-4a83-a772-2e48a9660641","key":"variant-Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322624-1","name":"Variant + Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322624 A","value":"true","created_at":"2026-03-12T13:37:04.259439Z","updated_at":"2026-03-12T13:37:04.259439Z"},{"id":"d9181ab0-b509-4c59-b65d-8ca14ab5004e","key":"variant-Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322624-2","name":"Variant + Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322624 B","value":"false","created_at":"2026-03-12T13:37:04.264649Z","updated_at":"2026-03-12T13:37:04.264649Z"}]}},{"id":"76efa54a-39b5-4d42-b779-c9cfe7ee6ab7","type":"feature-flags","attributes":{"archived_at":"2026-03-12T13:36:04.882778Z","created_at":"2026-03-12T13:36:04.294528Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Updated + description for the feature flag","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"172650da-6586-4ae2-bfeb-abd71c62b3b2","override_variant_id":null,"default_allocation_key":"allocation-default-2865f9a10bdc","override_allocation_key":"allocation-override-2865f9a10bdc","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"172650da-6586-4ae2-bfeb-abd71c62b3b2","override_variant_id":null,"default_allocation_key":"allocation-default-cc6052398290","override_allocation_key":"allocation-override-cc6052398290","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Typescript-Update_a_feature_flag_returns_OK_response-1773322564","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Updated + Test Feature Flag Test-Typescript-Update_a_feature_flag_returns_OK_response-1773322564","require_approval":false,"updated_at":"2026-03-12T13:36:04.882778Z","value_type":"BOOLEAN","variants":[{"id":"172650da-6586-4ae2-bfeb-abd71c62b3b2","key":"variant-Test-Typescript-Update_a_feature_flag_returns_OK_response-1773322564-1","name":"Variant + Test-Typescript-Update_a_feature_flag_returns_OK_response-1773322564 A","value":"true","created_at":"2026-03-12T13:36:04.300781Z","updated_at":"2026-03-12T13:36:04.300781Z"},{"id":"9b3ba26b-15f9-40b9-8889-f6bcdcce8426","key":"variant-Test-Typescript-Update_a_feature_flag_returns_OK_response-1773322564-2","name":"Variant + Test-Typescript-Update_a_feature_flag_returns_OK_response-1773322564 B","value":"false","created_at":"2026-03-12T13:36:04.3077Z","updated_at":"2026-03-12T13:36:04.3077Z"}]}},{"id":"939bf7aa-df2c-487b-8660-d8928ab124dc","type":"feature-flags","attributes":{"archived_at":"2026-03-12T13:36:04.005165Z","created_at":"2026-03-12T13:36:03.616473Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"df2f03c7-39c9-4df8-8911-d2b824a4f0ad","override_variant_id":null,"default_allocation_key":"allocation-default-9a30508e6edd","override_allocation_key":"allocation-override-9a30508e6edd","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"df2f03c7-39c9-4df8-8911-d2b824a4f0ad","override_variant_id":null,"default_allocation_key":"allocation-default-3a23cb825eff","override_allocation_key":"allocation-override-3a23cb825eff","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Typescript-Unarchive_a_feature_flag_returns_OK_response-1773322563","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Typescript-Unarchive_a_feature_flag_returns_OK_response-1773322563","require_approval":false,"updated_at":"2026-03-12T13:36:04.005165Z","value_type":"BOOLEAN","variants":[{"id":"df2f03c7-39c9-4df8-8911-d2b824a4f0ad","key":"variant-Test-Typescript-Unarchive_a_feature_flag_returns_OK_response-1773322563-1","name":"Variant + Test-Typescript-Unarchive_a_feature_flag_returns_OK_response-1773322563 A","value":"true","created_at":"2026-03-12T13:36:03.620876Z","updated_at":"2026-03-12T13:36:03.620876Z"},{"id":"b58af744-c67e-4cf2-8cf3-de1e8131a1a2","key":"variant-Test-Typescript-Unarchive_a_feature_flag_returns_OK_response-1773322563-2","name":"Variant + Test-Typescript-Unarchive_a_feature_flag_returns_OK_response-1773322563 B","value":"false","created_at":"2026-03-12T13:36:03.625764Z","updated_at":"2026-03-12T13:36:03.625764Z"}]}},{"id":"30179b76-f599-497a-95c1-626e071f728c","type":"feature-flags","attributes":{"archived_at":"2026-03-12T13:36:03.158483Z","created_at":"2026-03-12T13:36:02.828264Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"af8b295b-d73e-4cf4-8017-eac71968d68b","override_variant_id":null,"default_allocation_key":"allocation-default-d690389682fb","override_allocation_key":"allocation-override-d690389682fb","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"af8b295b-d73e-4cf4-8017-eac71968d68b","override_variant_id":null,"default_allocation_key":"allocation-default-06307bf47e2d","override_allocation_key":"allocation-override-06307bf47e2d","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322562","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322562","require_approval":false,"updated_at":"2026-03-12T13:36:03.158483Z","value_type":"BOOLEAN","variants":[{"id":"af8b295b-d73e-4cf4-8017-eac71968d68b","key":"variant-Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322562-1","name":"Variant + Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322562 A","value":"true","created_at":"2026-03-12T13:36:02.832979Z","updated_at":"2026-03-12T13:36:02.832979Z"},{"id":"77961d40-5e99-43cc-81a9-0837e427e171","key":"variant-Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322562-2","name":"Variant + Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322562 B","value":"false","created_at":"2026-03-12T13:36:02.838213Z","updated_at":"2026-03-12T13:36:02.838213Z"}]}},{"id":"520bad99-27db-47c6-bb75-f30c5a5fcaa3","type":"feature-flags","attributes":{"archived_at":"2026-03-12T13:36:02.121769Z","created_at":"2026-03-12T13:36:01.822833Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"0cde96d3-fead-473d-b545-2732d594eb63","override_variant_id":null,"default_allocation_key":"allocation-default-86717f6b9203","override_allocation_key":"allocation-override-86717f6b9203","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"0cde96d3-fead-473d-b545-2732d594eb63","override_variant_id":null,"default_allocation_key":"allocation-default-dfa229becc6e","override_allocation_key":"allocation-override-dfa229becc6e","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322561","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322561","require_approval":false,"updated_at":"2026-03-12T13:36:02.121769Z","value_type":"BOOLEAN","variants":[{"id":"0cde96d3-fead-473d-b545-2732d594eb63","key":"variant-Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322561-1","name":"Variant + Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322561 + A","value":"true","created_at":"2026-03-12T13:36:01.82783Z","updated_at":"2026-03-12T13:36:01.82783Z"},{"id":"09e25a9f-9147-48ce-be76-166e67e29cdc","key":"variant-Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322561-2","name":"Variant + Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322561 + B","value":"false","created_at":"2026-03-12T13:36:01.833351Z","updated_at":"2026-03-12T13:36:01.833351Z"}]}},{"id":"e3e4bbc9-742e-4a9e-b515-786ead78d659","type":"feature-flags","attributes":{"archived_at":"2026-03-12T13:36:01.495545Z","created_at":"2026-03-12T13:36:00.688626Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"d3e9926b-399e-465f-8c81-815abe9707a0","override_variant_id":null,"default_allocation_key":"allocation-default-8775f72a7f1c","override_allocation_key":"allocation-override-8775f72a7f1c","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"d3e9926b-399e-465f-8c81-815abe9707a0","override_variant_id":null,"default_allocation_key":"allocation-default-5b4a926b851e","override_allocation_key":"allocation-override-5b4a926b851e","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322560","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322560","require_approval":false,"updated_at":"2026-03-12T13:36:01.495545Z","value_type":"BOOLEAN","variants":[{"id":"d3e9926b-399e-465f-8c81-815abe9707a0","key":"variant-Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322560-1","name":"Variant + Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322560 A","value":"true","created_at":"2026-03-12T13:36:00.696201Z","updated_at":"2026-03-12T13:36:00.696201Z"},{"id":"6e54e3b1-c3e0-4405-a427-e53a7c946e91","key":"variant-Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322560-2","name":"Variant + Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322560 B","value":"false","created_at":"2026-03-12T13:36:00.7022Z","updated_at":"2026-03-12T13:36:00.7022Z"}]}},{"id":"f17a953b-ab1f-4c8a-bfb3-e193c9cf6b5f","type":"feature-flags","attributes":{"archived_at":"2026-03-12T13:35:22.504749Z","created_at":"2026-03-12T13:35:21.585632Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"bd52986d-33c7-43ec-8ccf-8c0e4147015b","override_variant_id":null,"default_allocation_key":"allocation-default-37c4b5e5e41e","override_allocation_key":"allocation-override-37c4b5e5e41e","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"bd52986d-33c7-43ec-8ccf-8c0e4147015b","override_variant_id":null,"default_allocation_key":"allocation-default-152180b1f742","override_allocation_key":"allocation-override-152180b1f742","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322521","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322521","require_approval":false,"updated_at":"2026-03-12T13:35:22.504749Z","value_type":"BOOLEAN","variants":[{"id":"bd52986d-33c7-43ec-8ccf-8c0e4147015b","key":"variant-Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322521-1","name":"Variant + Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322521 A","value":"true","created_at":"2026-03-12T13:35:21.590133Z","updated_at":"2026-03-12T13:35:21.590133Z"},{"id":"3ceb9689-56a0-44c1-abdf-3746f7958b57","key":"variant-Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322521-2","name":"Variant + Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322521 B","value":"false","created_at":"2026-03-12T13:35:21.595396Z","updated_at":"2026-03-12T13:35:21.595396Z"}]}},{"id":"eaac3ab2-8d2d-4399-8717-bea75c5aa0c8","type":"feature-flags","attributes":{"archived_at":"2026-03-12T13:34:28.507848Z","created_at":"2026-03-12T13:34:28.216131Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"1a6e287b-207e-494b-b483-82ac7beb6020","override_variant_id":null,"default_allocation_key":"allocation-default-8263824cf1ab","override_allocation_key":"allocation-override-8263824cf1ab","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"1a6e287b-207e-494b-b483-82ac7beb6020","override_variant_id":null,"default_allocation_key":"allocation-default-537626bbec02","override_allocation_key":"allocation-override-537626bbec02","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Typescript-Update_a_feature_flag_returns_OK_response-1773322468","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Typescript-Update_a_feature_flag_returns_OK_response-1773322468","require_approval":false,"updated_at":"2026-03-12T13:34:28.507848Z","value_type":"BOOLEAN","variants":[{"id":"1a6e287b-207e-494b-b483-82ac7beb6020","key":"variant-Test-Typescript-Update_a_feature_flag_returns_OK_response-1773322468-1","name":"Variant + Test-Typescript-Update_a_feature_flag_returns_OK_response-1773322468 A","value":"true","created_at":"2026-03-12T13:34:28.221737Z","updated_at":"2026-03-12T13:34:28.221737Z"},{"id":"6f4b9ea2-419e-4977-8a3e-1221f94ec73c","key":"variant-Test-Typescript-Update_a_feature_flag_returns_OK_response-1773322468-2","name":"Variant + Test-Typescript-Update_a_feature_flag_returns_OK_response-1773322468 B","value":"false","created_at":"2026-03-12T13:34:28.22761Z","updated_at":"2026-03-12T13:34:28.22761Z"}]}},{"id":"01994288-6ced-437b-a949-bb4f743ea987","type":"feature-flags","attributes":{"archived_at":"2026-03-12T13:34:27.88931Z","created_at":"2026-03-12T13:34:27.608307Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"8287eb2c-ac59-4ea0-86e8-324e22810cd2","override_variant_id":null,"default_allocation_key":"allocation-default-30b47ee21882","override_allocation_key":"allocation-override-30b47ee21882","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"8287eb2c-ac59-4ea0-86e8-324e22810cd2","override_variant_id":null,"default_allocation_key":"allocation-default-6f5b7879de7b","override_allocation_key":"allocation-override-6f5b7879de7b","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Typescript-Unarchive_a_feature_flag_returns_OK_response-1773322467","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Typescript-Unarchive_a_feature_flag_returns_OK_response-1773322467","require_approval":false,"updated_at":"2026-03-12T13:34:27.88931Z","value_type":"BOOLEAN","variants":[{"id":"8287eb2c-ac59-4ea0-86e8-324e22810cd2","key":"variant-Test-Typescript-Unarchive_a_feature_flag_returns_OK_response-1773322467-1","name":"Variant + Test-Typescript-Unarchive_a_feature_flag_returns_OK_response-1773322467 A","value":"true","created_at":"2026-03-12T13:34:27.612949Z","updated_at":"2026-03-12T13:34:27.612949Z"},{"id":"4b6b9a64-c8b0-4f98-bffe-9dc846d9cadd","key":"variant-Test-Typescript-Unarchive_a_feature_flag_returns_OK_response-1773322467-2","name":"Variant + Test-Typescript-Unarchive_a_feature_flag_returns_OK_response-1773322467 B","value":"false","created_at":"2026-03-12T13:34:27.61778Z","updated_at":"2026-03-12T13:34:27.61778Z"}]}},{"id":"5ccb0634-cab1-4369-aee0-4d246eea0b00","type":"feature-flags","attributes":{"archived_at":"2026-03-12T13:34:26.991783Z","created_at":"2026-03-12T13:34:26.708177Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"b3fec388-4cb6-4f2b-a1e0-61d6b0564416","override_variant_id":null,"default_allocation_key":"allocation-default-f572d815dc0c","override_allocation_key":"allocation-override-f572d815dc0c","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"b3fec388-4cb6-4f2b-a1e0-61d6b0564416","override_variant_id":null,"default_allocation_key":"allocation-default-d5fb95b9f3f3","override_allocation_key":"allocation-override-d5fb95b9f3f3","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322466","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322466","require_approval":false,"updated_at":"2026-03-12T13:34:26.991783Z","value_type":"BOOLEAN","variants":[{"id":"b3fec388-4cb6-4f2b-a1e0-61d6b0564416","key":"variant-Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322466-1","name":"Variant + Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322466 A","value":"true","created_at":"2026-03-12T13:34:26.712521Z","updated_at":"2026-03-12T13:34:26.712521Z"},{"id":"9fdacc99-a7a9-4176-b9f7-f33b52d73487","key":"variant-Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322466-2","name":"Variant + Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322466 B","value":"false","created_at":"2026-03-12T13:34:26.718409Z","updated_at":"2026-03-12T13:34:26.718409Z"}]}},{"id":"2e3b8c6f-2174-4f69-9be7-0aae9c0064c5","type":"feature-flags","attributes":{"archived_at":"2026-03-12T13:34:25.871324Z","created_at":"2026-03-12T13:34:25.555886Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"9a137623-f60b-4570-b7a2-363bc2e49740","override_variant_id":null,"default_allocation_key":"allocation-default-699356128b8a","override_allocation_key":"allocation-override-699356128b8a","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"9a137623-f60b-4570-b7a2-363bc2e49740","override_variant_id":null,"default_allocation_key":"allocation-default-b51659ae5261","override_allocation_key":"allocation-override-b51659ae5261","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322465","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322465","require_approval":false,"updated_at":"2026-03-12T13:34:25.871324Z","value_type":"BOOLEAN","variants":[{"id":"9a137623-f60b-4570-b7a2-363bc2e49740","key":"variant-Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322465-1","name":"Variant + Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322465 + A","value":"true","created_at":"2026-03-12T13:34:25.561069Z","updated_at":"2026-03-12T13:34:25.561069Z"},{"id":"02485a39-3f89-46d3-a606-7e3809d88f3d","key":"variant-Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322465-2","name":"Variant + Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322465 + B","value":"false","created_at":"2026-03-12T13:34:25.566671Z","updated_at":"2026-03-12T13:34:25.566671Z"}]}},{"id":"9565a371-5d11-45ed-920f-e33680804da2","type":"feature-flags","attributes":{"archived_at":"2026-03-12T13:34:25.246768Z","created_at":"2026-03-12T13:34:24.968319Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"f54c2bfa-aad4-4c3c-81f8-6b143076ec65","override_variant_id":null,"default_allocation_key":"allocation-default-9cad342badc6","override_allocation_key":"allocation-override-9cad342badc6","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"f54c2bfa-aad4-4c3c-81f8-6b143076ec65","override_variant_id":null,"default_allocation_key":"allocation-default-e5d795e7c26b","override_allocation_key":"allocation-override-e5d795e7c26b","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322464","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322464","require_approval":false,"updated_at":"2026-03-12T13:34:25.246768Z","value_type":"BOOLEAN","variants":[{"id":"f54c2bfa-aad4-4c3c-81f8-6b143076ec65","key":"variant-Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322464-1","name":"Variant + Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322464 A","value":"true","created_at":"2026-03-12T13:34:24.974913Z","updated_at":"2026-03-12T13:34:24.974913Z"},{"id":"4e94d070-9c62-493b-99e7-76411709eee7","key":"variant-Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322464-2","name":"Variant + Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322464 B","value":"false","created_at":"2026-03-12T13:34:24.981579Z","updated_at":"2026-03-12T13:34:24.981579Z"}]}},{"id":"a7648841-2496-4459-9f8e-022cd0c97513","type":"feature-flags","attributes":{"archived_at":"2026-03-12T13:32:23.480861Z","created_at":"2026-03-12T13:32:22.618952Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"0c4209be-e7d9-4f78-85ed-08711a76579b","override_variant_id":null,"default_allocation_key":"allocation-default-28a7a71b6da9","override_allocation_key":"allocation-override-28a7a71b6da9","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"0c4209be-e7d9-4f78-85ed-08711a76579b","override_variant_id":null,"default_allocation_key":"allocation-default-940e7867ddcf","override_allocation_key":"allocation-override-940e7867ddcf","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322342","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322342","require_approval":false,"updated_at":"2026-03-12T13:32:23.480861Z","value_type":"BOOLEAN","variants":[{"id":"0c4209be-e7d9-4f78-85ed-08711a76579b","key":"variant-Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322342-1","name":"Variant + Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322342 + A","value":"true","created_at":"2026-03-12T13:32:22.626024Z","updated_at":"2026-03-12T13:32:22.626024Z"},{"id":"602d40bc-a95e-40ac-af42-9bf2eb9fb316","key":"variant-Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322342-2","name":"Variant + Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322342 + B","value":"false","created_at":"2026-03-12T13:32:22.632151Z","updated_at":"2026-03-12T13:32:22.632151Z"}]}},{"id":"2ec35434-b877-4e53-8ae1-979c29256fe1","type":"feature-flags","attributes":{"archived_at":null,"created_at":"2026-03-12T13:29:26.717726Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"8af6a5ba-2f99-41e7-bac4-deef9931bff0","override_variant_id":null,"default_allocation_key":"allocation-default-15ab366aa784","override_allocation_key":"allocation-override-15ab366aa784","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"8af6a5ba-2f99-41e7-bac4-deef9931bff0","override_variant_id":null,"default_allocation_key":"allocation-default-26afbfd56519","override_allocation_key":"allocation-override-26afbfd56519","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322166","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322166","require_approval":false,"updated_at":"2026-03-12T13:29:26.717726Z","value_type":"BOOLEAN","variants":[{"id":"8af6a5ba-2f99-41e7-bac4-deef9931bff0","key":"control","name":"Control + Variant","value":"true","created_at":"2026-03-12T13:29:26.724161Z","updated_at":"2026-03-12T13:29:26.724161Z"},{"id":"2a776a3d-3a95-485f-a5c0-2b7a88f37592","key":"treatment","name":"Treatment + Variant","value":"false","created_at":"2026-03-12T13:29:26.729873Z","updated_at":"2026-03-12T13:29:26.729873Z"}]}},{"id":"be858a9c-b138-41e0-9a69-1d9428af7eae","type":"feature-flags","attributes":{"archived_at":null,"created_at":"2026-03-12T13:15:39.888601Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"72e742af-53eb-42d4-b37d-439f9bec5fc6","override_variant_id":null,"default_allocation_key":"allocation-default-02014ec620b9","override_allocation_key":"allocation-override-02014ec620b9","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"72e742af-53eb-42d4-b37d-439f9bec5fc6","override_variant_id":null,"default_allocation_key":"allocation-default-107fa83042b3","override_allocation_key":"allocation-override-107fa83042b3","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Typescript-Create_a_feature_flag_returns_Created_response-1773321339","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Typescript-Create_a_feature_flag_returns_Created_response-1773321339","require_approval":false,"updated_at":"2026-03-12T13:15:39.888601Z","value_type":"BOOLEAN","variants":[{"id":"72e742af-53eb-42d4-b37d-439f9bec5fc6","key":"control","name":"Control + Variant","value":"true","created_at":"2026-03-12T13:15:39.894436Z","updated_at":"2026-03-12T13:15:39.894436Z"},{"id":"48831504-3d32-4a92-923a-48fd42ad92e6","key":"treatment","name":"Treatment + Variant","value":"false","created_at":"2026-03-12T13:15:39.899596Z","updated_at":"2026-03-12T13:15:39.899596Z"}]}},{"id":"3277d991-9fe1-4f28-b9cb-18be80b12062","type":"feature-flags","attributes":{"archived_at":null,"created_at":"2026-03-12T13:10:40.38077Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"f0c2b512-3699-44ce-a649-12ea64ed3583","override_variant_id":null,"default_allocation_key":"allocation-default-da2fbe33b5a0","override_allocation_key":"allocation-override-da2fbe33b5a0","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"f0c2b512-3699-44ce-a649-12ea64ed3583","override_variant_id":null,"default_allocation_key":"allocation-default-fc3b39d59b88","override_allocation_key":"allocation-override-fc3b39d59b88","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Typescript-Create_a_feature_flag_returns_Created_response-1773321040","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Typescript-Create_a_feature_flag_returns_Created_response-1773321040","require_approval":false,"updated_at":"2026-03-12T13:10:40.38077Z","value_type":"BOOLEAN","variants":[{"id":"f0c2b512-3699-44ce-a649-12ea64ed3583","key":"control","name":"Control + Variant","value":"true","created_at":"2026-03-12T13:10:40.388021Z","updated_at":"2026-03-12T13:10:40.388021Z"},{"id":"20f36481-56b9-4375-b8ed-8a49f08d32a3","key":"treatment","name":"Treatment + Variant","value":"false","created_at":"2026-03-12T13:10:40.395371Z","updated_at":"2026-03-12T13:10:40.395371Z"}]}},{"id":"6a5bea8b-df58-4fd0-afd0-9638ece57040","type":"feature-flags","attributes":{"archived_at":null,"created_at":"2026-03-12T13:08:25.297211Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"5b707087-cec0-4881-9697-9b30643fa169","override_variant_id":null,"default_allocation_key":"allocation-default-82644cffc884","override_allocation_key":"allocation-override-82644cffc884","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"5b707087-cec0-4881-9697-9b30643fa169","override_variant_id":null,"default_allocation_key":"allocation-default-ae59c175742b","override_allocation_key":"allocation-override-ae59c175742b","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Typescript-Create_a_feature_flag_returns_Created_response-1773320905","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Typescript-Create_a_feature_flag_returns_Created_response-1773320905","require_approval":false,"updated_at":"2026-03-12T13:08:25.297211Z","value_type":"BOOLEAN","variants":[{"id":"5b707087-cec0-4881-9697-9b30643fa169","key":"control","name":"Control + Variant","value":"true","created_at":"2026-03-12T13:08:25.304617Z","updated_at":"2026-03-12T13:08:25.304617Z"},{"id":"458b8b3e-4d00-436e-81b8-b2a38bd81393","key":"treatment","name":"Treatment + Variant","value":"false","created_at":"2026-03-12T13:08:25.311822Z","updated_at":"2026-03-12T13:08:25.311822Z"}]}},{"id":"7d07186d-23c7-404e-9ec6-893938d28700","type":"feature-flags","attributes":{"archived_at":null,"created_at":"2026-03-12T13:06:17.973951Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"ded05994-1aab-4654-9974-96dda26dded8","override_variant_id":null,"default_allocation_key":"allocation-default-27665a2a516f","override_allocation_key":"allocation-override-27665a2a516f","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"ded05994-1aab-4654-9974-96dda26dded8","override_variant_id":null,"default_allocation_key":"allocation-default-22f957f03cae","override_allocation_key":"allocation-override-22f957f03cae","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Typescript-Create_a_feature_flag_returns_Created_response-1773320777","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Typescript-Create_a_feature_flag_returns_Created_response-1773320777","require_approval":false,"updated_at":"2026-03-12T13:06:17.973951Z","value_type":"BOOLEAN","variants":[{"id":"ded05994-1aab-4654-9974-96dda26dded8","key":"control","name":"Control + Variant","value":"true","created_at":"2026-03-12T13:06:17.980872Z","updated_at":"2026-03-12T13:06:17.980872Z"},{"id":"ce407a13-d353-4219-afed-56b30baf2c65","key":"treatment","name":"Treatment + Variant","value":"false","created_at":"2026-03-12T13:06:17.987094Z","updated_at":"2026-03-12T13:06:17.987094Z"}]}}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/feature_flags/Update-a-feature-flag-returns-OK-response.frozen b/cassettes/features/v2/feature_flags/Update-a-feature-flag-returns-OK-response.frozen new file mode 100644 index 000000000000..c47c9cfba17b --- /dev/null +++ b/cassettes/features/v2/feature_flags/Update-a-feature-flag-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-03-17T17:26:25.094Z \ No newline at end of file diff --git a/cassettes/features/v2/feature_flags/Update-a-feature-flag-returns-OK-response.yml b/cassettes/features/v2/feature_flags/Update-a-feature-flag-returns-OK-response.yml new file mode 100644 index 000000000000..f2900634d97e --- /dev/null +++ b/cassettes/features/v2/feature_flags/Update-a-feature-flag-returns-OK-response.yml @@ -0,0 +1,86 @@ +http_interactions: +- recorded_at: Tue, 17 Mar 2026 17:26:25 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"description":"Test feature flag for BDD scenarios","key":"test-feature-flag-Test-Update_a_feature_flag_returns_OK_response-1773768385","name":"Test + Feature Flag Test-Update_a_feature_flag_returns_OK_response-1773768385","value_type":"BOOLEAN","variants":[{"key":"variant-Test-Update_a_feature_flag_returns_OK_response-1773768385-1","name":"Variant + Test-Update_a_feature_flag_returns_OK_response-1773768385 A","value":"true"},{"key":"variant-Test-Update_a_feature_flag_returns_OK_response-1773768385-2","name":"Variant + Test-Update_a_feature_flag_returns_OK_response-1773768385 B","value":"false"}]},"type":"feature-flags"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/feature-flags + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"d85c87aa-0135-44bd-82fe-2a1d94ef47b8","type":"feature-flags","attributes":{"archived_at":null,"created_at":"2026-03-17T17:26:25.181649Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Test + feature flag for BDD scenarios","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"8060af6a-82b1-41aa-afa1-67c31941759b","override_variant_id":null,"default_allocation_key":"allocation-default-655048e8bd8f","override_allocation_key":"allocation-override-655048e8bd8f","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"8060af6a-82b1-41aa-afa1-67c31941759b","override_variant_id":null,"default_allocation_key":"allocation-default-bd1885d53d49","override_allocation_key":"allocation-override-bd1885d53d49","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Update_a_feature_flag_returns_OK_response-1773768385","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Test + Feature Flag Test-Update_a_feature_flag_returns_OK_response-1773768385","require_approval":false,"updated_at":"2026-03-17T17:26:25.181649Z","value_type":"BOOLEAN","variants":[{"id":"8060af6a-82b1-41aa-afa1-67c31941759b","key":"variant-Test-Update_a_feature_flag_returns_OK_response-1773768385-1","name":"Variant + Test-Update_a_feature_flag_returns_OK_response-1773768385 A","value":"true","created_at":"2026-03-17T17:26:25.186574Z","updated_at":"2026-03-17T17:26:25.186574Z"},{"id":"c64c899c-f77d-4219-9fcd-a61bc0ddd7ef","key":"variant-Test-Update_a_feature_flag_returns_OK_response-1773768385-2","name":"Variant + Test-Update_a_feature_flag_returns_OK_response-1773768385 B","value":"false","created_at":"2026-03-17T17:26:25.189886Z","updated_at":"2026-03-17T17:26:25.189886Z"}]}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Tue, 17 Mar 2026 17:26:25 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"description":"Updated description for the feature + flag","name":"Updated Test Feature Flag Test-Update_a_feature_flag_returns_OK_response-1773768385"},"type":"feature-flags"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PUT + uri: https://api.datadoghq.com/api/v2/feature-flags/d85c87aa-0135-44bd-82fe-2a1d94ef47b8 + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"d85c87aa-0135-44bd-82fe-2a1d94ef47b8","type":"feature-flags","attributes":{"archived_at":null,"created_at":"2026-03-17T17:26:25.181649Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Updated + description for the feature flag","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"8060af6a-82b1-41aa-afa1-67c31941759b","override_variant_id":null,"default_allocation_key":"allocation-default-655048e8bd8f","override_allocation_key":"allocation-override-655048e8bd8f","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"8060af6a-82b1-41aa-afa1-67c31941759b","override_variant_id":null,"default_allocation_key":"allocation-default-bd1885d53d49","override_allocation_key":"allocation-override-bd1885d53d49","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Update_a_feature_flag_returns_OK_response-1773768385","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Updated + Test Feature Flag Test-Update_a_feature_flag_returns_OK_response-1773768385","require_approval":false,"updated_at":"2026-03-17T17:26:25.380092Z","value_type":"BOOLEAN","variants":[{"id":"8060af6a-82b1-41aa-afa1-67c31941759b","key":"variant-Test-Update_a_feature_flag_returns_OK_response-1773768385-1","name":"Variant + Test-Update_a_feature_flag_returns_OK_response-1773768385 A","value":"true","created_at":"2026-03-17T17:26:25.186574Z","updated_at":"2026-03-17T17:26:25.186574Z"},{"id":"c64c899c-f77d-4219-9fcd-a61bc0ddd7ef","key":"variant-Test-Update_a_feature_flag_returns_OK_response-1773768385-2","name":"Variant + Test-Update_a_feature_flag_returns_OK_response-1773768385 B","value":"false","created_at":"2026-03-17T17:26:25.189886Z","updated_at":"2026-03-17T17:26:25.189886Z"}]}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Tue, 17 Mar 2026 17:26:25 GMT + request: + body: null + headers: + Accept: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/feature-flags/d85c87aa-0135-44bd-82fe-2a1d94ef47b8/archive + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"d85c87aa-0135-44bd-82fe-2a1d94ef47b8","type":"feature-flags","attributes":{"archived_at":"2026-03-17T17:26:25.680224Z","created_at":"2026-03-17T17:26:25.181649Z","created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"Updated + description for the feature flag","distribution_channel":"ALL","feature_flag_environments":[{"environment_id":"0b94dbaa-9efb-419d-8bd7-ef56f3828986","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543","status":"DISABLED","default_variant_id":"8060af6a-82b1-41aa-afa1-67c31941759b","override_variant_id":null,"default_allocation_key":"allocation-default-655048e8bd8f","override_allocation_key":"allocation-override-655048e8bd8f","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false},{"environment_id":"afdaa512-6307-4965-bf92-62cc6bea5d00","environment_name":"Test + Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166","status":"DISABLED","default_variant_id":"8060af6a-82b1-41aa-afa1-67c31941759b","override_variant_id":null,"default_allocation_key":"allocation-default-bd1885d53d49","override_allocation_key":"allocation-override-bd1885d53d49","rules":[],"rollout_percentage":0,"allocations":null,"is_production":false,"pending_suggestion_id":null,"require_feature_flag_approval":false}],"key":"test-feature-flag-Test-Update_a_feature_flag_returns_OK_response-1773768385","last_updated_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"Updated + Test Feature Flag Test-Update_a_feature_flag_returns_OK_response-1773768385","require_approval":false,"updated_at":"2026-03-17T17:26:25.680224Z","value_type":"BOOLEAN","variants":[{"id":"8060af6a-82b1-41aa-afa1-67c31941759b","key":"variant-Test-Update_a_feature_flag_returns_OK_response-1773768385-1","name":"Variant + Test-Update_a_feature_flag_returns_OK_response-1773768385 A","value":"true","created_at":"2026-03-17T17:26:25.186574Z","updated_at":"2026-03-17T17:26:25.186574Z"},{"id":"c64c899c-f77d-4219-9fcd-a61bc0ddd7ef","key":"variant-Test-Update_a_feature_flag_returns_OK_response-1773768385-2","name":"Variant + Test-Update_a_feature_flag_returns_OK_response-1773768385 B","value":"false","created_at":"2026-03-17T17:26:25.189886Z","updated_at":"2026-03-17T17:26:25.189886Z"}]}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/examples/v2/feature-flags/ArchiveFeatureFlag.rb b/examples/v2/feature-flags/ArchiveFeatureFlag.rb new file mode 100644 index 000000000000..ef2b6e4ffd6b --- /dev/null +++ b/examples/v2/feature-flags/ArchiveFeatureFlag.rb @@ -0,0 +1,8 @@ +# Archive a feature flag returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::FeatureFlagsAPI.new + +# there is a valid "feature_flag" in the system +FEATURE_FLAG_DATA_ID = ENV["FEATURE_FLAG_DATA_ID"] +p api_instance.archive_feature_flag(FEATURE_FLAG_DATA_ID) diff --git a/examples/v2/feature-flags/CreateEnvironment.rb b/examples/v2/feature-flags/CreateEnvironment.rb new file mode 100644 index 000000000000..b6ac0d0d69ef --- /dev/null +++ b/examples/v2/feature-flags/CreateEnvironment.rb @@ -0,0 +1,18 @@ +# Create an environment returns "Created" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::FeatureFlagsAPI.new + +body = DatadogAPIClient::V2::CreateEnvironmentRequest.new({ + data: DatadogAPIClient::V2::CreateEnvironmentData.new({ + type: DatadogAPIClient::V2::CreateEnvironmentDataType::ENVIRONMENTS, + attributes: DatadogAPIClient::V2::CreateEnvironmentAttributes.new({ + name: "Test Environment Example-Feature-Flag", + queries: [ + "test-Example-Feature-Flag", + "env-Example-Feature-Flag", + ], + }), + }), +}) +p api_instance.create_environment(body) diff --git a/examples/v2/feature-flags/CreateFeatureFlag.rb b/examples/v2/feature-flags/CreateFeatureFlag.rb new file mode 100644 index 000000000000..77186b0cc494 --- /dev/null +++ b/examples/v2/feature-flags/CreateFeatureFlag.rb @@ -0,0 +1,30 @@ +# Create a feature flag returns "Created" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::FeatureFlagsAPI.new + +body = DatadogAPIClient::V2::CreateFeatureFlagRequest.new({ + data: DatadogAPIClient::V2::CreateFeatureFlagData.new({ + type: DatadogAPIClient::V2::CreateFeatureFlagDataType::FEATURE_FLAGS, + attributes: DatadogAPIClient::V2::CreateFeatureFlagAttributes.new({ + default_variant_key: "variant-Example-Feature-Flag-1", + description: "Test feature flag for BDD scenarios", + key: "test-feature-flag-Example-Feature-Flag", + name: "Test Feature Flag Example-Feature-Flag", + value_type: DatadogAPIClient::V2::ValueType::BOOLEAN, + variants: [ + DatadogAPIClient::V2::CreateVariant.new({ + key: "variant-Example-Feature-Flag-1", + name: "Variant Example-Feature-Flag A", + value: "true", + }), + DatadogAPIClient::V2::CreateVariant.new({ + key: "variant-Example-Feature-Flag-2", + name: "Variant Example-Feature-Flag B", + value: "false", + }), + ], + }), + }), +}) +p api_instance.create_feature_flag(body) diff --git a/examples/v2/feature-flags/DeleteEnvironment.rb b/examples/v2/feature-flags/DeleteEnvironment.rb new file mode 100644 index 000000000000..a8426b631368 --- /dev/null +++ b/examples/v2/feature-flags/DeleteEnvironment.rb @@ -0,0 +1,8 @@ +# Delete an environment returns "No Content" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::FeatureFlagsAPI.new + +# there is a valid "environment" in the system +ENVIRONMENT_DATA_ID = ENV["ENVIRONMENT_DATA_ID"] +api_instance.delete_environment(ENVIRONMENT_DATA_ID) diff --git a/examples/v2/feature-flags/DisableFeatureFlagEnvironment.rb b/examples/v2/feature-flags/DisableFeatureFlagEnvironment.rb new file mode 100644 index 000000000000..bc4f278108a7 --- /dev/null +++ b/examples/v2/feature-flags/DisableFeatureFlagEnvironment.rb @@ -0,0 +1,11 @@ +# Disable a feature flag in an environment returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::FeatureFlagsAPI.new + +# there is a valid "feature_flag" in the system +FEATURE_FLAG_DATA_ID = ENV["FEATURE_FLAG_DATA_ID"] + +# there is a valid "environment" in the system +ENVIRONMENT_DATA_ID = ENV["ENVIRONMENT_DATA_ID"] +p api_instance.disable_feature_flag_environment(FEATURE_FLAG_DATA_ID, ENVIRONMENT_DATA_ID) diff --git a/examples/v2/feature-flags/EnableFeatureFlagEnvironment.rb b/examples/v2/feature-flags/EnableFeatureFlagEnvironment.rb new file mode 100644 index 000000000000..6b40ce4d9f0a --- /dev/null +++ b/examples/v2/feature-flags/EnableFeatureFlagEnvironment.rb @@ -0,0 +1,11 @@ +# Enable a feature flag in an environment returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::FeatureFlagsAPI.new + +# there is a valid "feature_flag" in the system +FEATURE_FLAG_DATA_ID = ENV["FEATURE_FLAG_DATA_ID"] + +# there is a valid "environment" in the system +ENVIRONMENT_DATA_ID = ENV["ENVIRONMENT_DATA_ID"] +p api_instance.enable_feature_flag_environment(FEATURE_FLAG_DATA_ID, ENVIRONMENT_DATA_ID) diff --git a/examples/v2/feature-flags/GetEnvironment.rb b/examples/v2/feature-flags/GetEnvironment.rb new file mode 100644 index 000000000000..61e32a37057b --- /dev/null +++ b/examples/v2/feature-flags/GetEnvironment.rb @@ -0,0 +1,8 @@ +# Get an environment returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::FeatureFlagsAPI.new + +# there is a valid "environment" in the system +ENVIRONMENT_DATA_ID = ENV["ENVIRONMENT_DATA_ID"] +p api_instance.get_environment(ENVIRONMENT_DATA_ID) diff --git a/examples/v2/feature-flags/GetFeatureFlag.rb b/examples/v2/feature-flags/GetFeatureFlag.rb new file mode 100644 index 000000000000..bfa92bc43099 --- /dev/null +++ b/examples/v2/feature-flags/GetFeatureFlag.rb @@ -0,0 +1,8 @@ +# Get a feature flag returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::FeatureFlagsAPI.new + +# there is a valid "feature_flag" in the system +FEATURE_FLAG_DATA_ID = ENV["FEATURE_FLAG_DATA_ID"] +p api_instance.get_feature_flag(FEATURE_FLAG_DATA_ID) diff --git a/examples/v2/feature-flags/ListEnvironments.rb b/examples/v2/feature-flags/ListEnvironments.rb new file mode 100644 index 000000000000..fcbc5754f8e4 --- /dev/null +++ b/examples/v2/feature-flags/ListEnvironments.rb @@ -0,0 +1,5 @@ +# List environments returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::FeatureFlagsAPI.new +p api_instance.list_environments() diff --git a/examples/v2/feature-flags/ListFeatureFlags.rb b/examples/v2/feature-flags/ListFeatureFlags.rb new file mode 100644 index 000000000000..463279609d48 --- /dev/null +++ b/examples/v2/feature-flags/ListFeatureFlags.rb @@ -0,0 +1,5 @@ +# List feature flags returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::FeatureFlagsAPI.new +p api_instance.list_feature_flags() diff --git a/examples/v2/feature-flags/UnarchiveFeatureFlag.rb b/examples/v2/feature-flags/UnarchiveFeatureFlag.rb new file mode 100644 index 000000000000..9dede0c814ee --- /dev/null +++ b/examples/v2/feature-flags/UnarchiveFeatureFlag.rb @@ -0,0 +1,8 @@ +# Unarchive a feature flag returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::FeatureFlagsAPI.new + +# there is a valid "feature_flag" in the system +FEATURE_FLAG_DATA_ID = ENV["FEATURE_FLAG_DATA_ID"] +p api_instance.unarchive_feature_flag(FEATURE_FLAG_DATA_ID) diff --git a/examples/v2/feature-flags/UpdateEnvironment.rb b/examples/v2/feature-flags/UpdateEnvironment.rb new file mode 100644 index 000000000000..125a5a6a5252 --- /dev/null +++ b/examples/v2/feature-flags/UpdateEnvironment.rb @@ -0,0 +1,21 @@ +# Update an environment returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::FeatureFlagsAPI.new + +# there is a valid "environment" in the system +ENVIRONMENT_DATA_ID = ENV["ENVIRONMENT_DATA_ID"] + +body = DatadogAPIClient::V2::UpdateEnvironmentRequest.new({ + data: DatadogAPIClient::V2::UpdateEnvironmentData.new({ + type: DatadogAPIClient::V2::UpdateEnvironmentDataType::ENVIRONMENTS, + attributes: DatadogAPIClient::V2::UpdateEnvironmentAttributes.new({ + name: "Updated Test Environment Example-Feature-Flag", + queries: [ + "updated-Example-Feature-Flag", + "live-Example-Feature-Flag", + ], + }), + }), +}) +p api_instance.update_environment(ENVIRONMENT_DATA_ID, body) diff --git a/examples/v2/feature-flags/UpdateFeatureFlag.rb b/examples/v2/feature-flags/UpdateFeatureFlag.rb new file mode 100644 index 000000000000..063de479fc03 --- /dev/null +++ b/examples/v2/feature-flags/UpdateFeatureFlag.rb @@ -0,0 +1,18 @@ +# Update a feature flag returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::FeatureFlagsAPI.new + +# there is a valid "feature_flag" in the system +FEATURE_FLAG_DATA_ID = ENV["FEATURE_FLAG_DATA_ID"] + +body = DatadogAPIClient::V2::UpdateFeatureFlagRequest.new({ + data: DatadogAPIClient::V2::UpdateFeatureFlagData.new({ + type: DatadogAPIClient::V2::UpdateFeatureFlagDataType::FEATURE_FLAGS, + attributes: DatadogAPIClient::V2::UpdateFeatureFlagAttributes.new({ + description: "Updated description for the feature flag", + name: "Updated Test Feature Flag Example-Feature-Flag", + }), + }), +}) +p api_instance.update_feature_flag(FEATURE_FLAG_DATA_ID, body) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index a3162c56f7a1..8732fa4b739f 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -1607,6 +1607,9 @@ "filter_operating_system_name" => "String", "filter_operating_system_version" => "String", }, + "v2.ListSecurityMonitoringCriticalAssets" => { + "query" => "String", + }, "v2.CreateSecurityMonitoringCriticalAsset" => { "body" => "SecurityMonitoringCriticalAssetCreateRequest", }, @@ -2153,6 +2156,55 @@ "v2.GetEvent" => { "event_id" => "String", }, + "v2.ListFeatureFlags" => { + "key" => "String", + "is_archived" => "Boolean", + "limit" => "Integer", + "offset" => "Integer", + }, + "v2.CreateFeatureFlag" => { + "body" => "CreateFeatureFlagRequest", + }, + "v2.ListEnvironments" => { + "name" => "String", + "key" => "String", + "limit" => "Integer", + "offset" => "Integer", + }, + "v2.CreateEnvironment" => { + "body" => "CreateEnvironmentRequest", + }, + "v2.DeleteEnvironment" => { + "environment_id" => "UUID", + }, + "v2.GetEnvironment" => { + "environment_id" => "UUID", + }, + "v2.UpdateEnvironment" => { + "environment_id" => "UUID", + "body" => "UpdateEnvironmentRequest", + }, + "v2.GetFeatureFlag" => { + "feature_flag_id" => "UUID", + }, + "v2.UpdateFeatureFlag" => { + "feature_flag_id" => "UUID", + "body" => "UpdateFeatureFlagRequest", + }, + "v2.ArchiveFeatureFlag" => { + "feature_flag_id" => "UUID", + }, + "v2.DisableFeatureFlagEnvironment" => { + "feature_flag_id" => "UUID", + "environment_id" => "UUID", + }, + "v2.EnableFeatureFlagEnvironment" => { + "feature_flag_id" => "UUID", + "environment_id" => "UUID", + }, + "v2.UnarchiveFeatureFlag" => { + "feature_flag_id" => "UUID", + }, "v2.CreateHamrOrgConnection" => { "body" => "HamrOrgConnectionRequest", }, diff --git a/features/v2/feature_flags.feature b/features/v2/feature_flags.feature new file mode 100644 index 000000000000..5519a57635b6 --- /dev/null +++ b/features/v2/feature_flags.feature @@ -0,0 +1,265 @@ +@endpoint(feature-flags) @endpoint(feature-flags-v2) +Feature: Feature Flags + Manage feature flags and environments. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "FeatureFlags" API + + @skip @team:DataDog/oncall-feature-flags + Scenario: Archive a feature flag returns "Bad Request" response + Given new "ArchiveFeatureFlag" request + And request contains "feature_flag_id" parameter with value "00000000-0000-0000-0000-000000000000" + When the request is sent + Then the response status is 400 Bad Request + + @skip @team:DataDog/oncall-feature-flags + Scenario: Archive a feature flag returns "Not Found" response + Given new "ArchiveFeatureFlag" request + And request contains "feature_flag_id" parameter with value "00000000-0000-0000-0000-000000000000" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/oncall-feature-flags + Scenario: Archive a feature flag returns "OK" response + Given there is a valid "feature_flag" in the system + And new "ArchiveFeatureFlag" request + And request contains "feature_flag_id" parameter from "feature_flag.data.id" + When the request is sent + Then the response status is 200 OK + + @skip @team:DataDog/oncall-feature-flags + Scenario: Create a feature flag returns "Bad Request" response + Given new "CreateFeatureFlag" request + And body with value {"data": {"type": "feature-flags", "attributes": {"default_variant_key": "control", "description": "This is an example feature flag for demonstration", "json_schema": "{\"type\": \"object\", \"properties\": {\"enabled\": {\"type\": \"boolean\"}}}", "key": "example-feature-flag", "name": "Example Feature Flag", "value_type": "BOOLEAN", "variants": [{"key": "control", "name": "Control Variant", "value": "true"}]}}} + When the request is sent + Then the response status is 400 Bad Request + + @skip @team:DataDog/oncall-feature-flags + Scenario: Create a feature flag returns "Conflict" response + Given new "CreateFeatureFlag" request + And body with value {"data": {"type": "feature-flags", "attributes": {"default_variant_key": "control", "description": "This is an example feature flag for demonstration", "json_schema": "{\"type\": \"object\", \"properties\": {\"enabled\": {\"type\": \"boolean\"}}}", "key": "example-feature-flag", "name": "Example Feature Flag", "value_type": "BOOLEAN", "variants": [{"key": "control", "name": "Control Variant", "value": "true"}]}}} + When the request is sent + Then the response status is 409 Conflict + + @team:DataDog/oncall-feature-flags + Scenario: Create a feature flag returns "Created" response + Given new "CreateFeatureFlag" request + And body with value {"data": {"type": "feature-flags", "attributes": {"default_variant_key": "variant-{{ unique }}-1", "description": "Test feature flag for BDD scenarios", "key": "test-feature-flag-{{ unique }}", "name": "Test Feature Flag {{ unique }}", "value_type": "BOOLEAN", "variants": [{"key": "variant-{{ unique }}-1", "name": "Variant {{ unique }} A", "value": "true"}, {"key": "variant-{{ unique }}-2", "name": "Variant {{ unique }} B", "value": "false"}]}}} + When the request is sent + Then the response status is 201 Created + And the response "data.attributes.key" is equal to "test-feature-flag-{{ unique }}" + And the response "data.attributes.name" is equal to "Test Feature Flag {{ unique }}" + And the response "data.attributes.value_type" is equal to "BOOLEAN" + + @skip @team:DataDog/oncall-feature-flags + Scenario: Create an environment returns "Bad Request" response + Given new "CreateEnvironment" request + And body with value {"data": {"type": "environments", "attributes": {"description": "Staging environment for testing", "key": "staging", "name": "staging"}}} + When the request is sent + Then the response status is 400 Bad Request + + @skip @team:DataDog/oncall-feature-flags + Scenario: Create an environment returns "Conflict" response + Given new "CreateEnvironment" request + And body with value {"data": {"type": "environments", "attributes": {"description": "Staging environment for testing", "key": "staging", "name": "staging"}}} + When the request is sent + Then the response status is 409 Conflict + + @team:DataDog/oncall-feature-flags + Scenario: Create an environment returns "Created" response + Given new "CreateEnvironment" request + And body with value {"data": {"type": "environments", "attributes": {"name": "Test Environment {{ unique }}", "queries": ["test-{{ unique }}", "env-{{ unique }}"]}}} + When the request is sent + Then the response status is 201 Created + + @skip @team:DataDog/oncall-feature-flags + Scenario: Delete an environment returns "No Content" response + Given there is a valid "environment" in the system + And new "DeleteEnvironment" request + And request contains "environment_id" parameter from "environment.data.id" + When the request is sent + Then the response status is 204 No Content + + @skip @team:DataDog/oncall-feature-flags + Scenario: Delete an environment returns "Not Found" response + Given new "DeleteEnvironment" request + And request contains "environment_id" parameter with value "00000000-0000-0000-0000-000000000000" + When the request is sent + Then the response status is 404 Not Found + + @skip @team:DataDog/oncall-feature-flags + Scenario: Disable a feature flag in an environment returns "Accepted - Approval required for this change" response + Given there is a valid "feature_flag" in the system + And there is a valid "environment" in the system + And new "DisableFeatureFlagEnvironment" request + And request contains "feature_flag_id" parameter from "feature_flag.data.id" + And request contains "environment_id" parameter from "environment.data.id" + When the request is sent + Then the response status is 202 Accepted - Approval required for this change + + @skip @team:DataDog/oncall-feature-flags + Scenario: Disable a feature flag in an environment returns "Not Found" response + Given new "DisableFeatureFlagEnvironment" request + And request contains "feature_flag_id" parameter with value "00000000-0000-0000-0000-000000000000" + And request contains "environment_id" parameter with value "00000000-0000-0000-0000-000000000001" + When the request is sent + Then the response status is 404 Not Found + + @skip @team:DataDog/oncall-feature-flags + Scenario: Disable a feature flag in an environment returns "OK" response + Given there is a valid "feature_flag" in the system + And there is a valid "environment" in the system + And new "DisableFeatureFlagEnvironment" request + And request contains "feature_flag_id" parameter from "feature_flag.data.id" + And request contains "environment_id" parameter from "environment.data.id" + When the request is sent + Then the response status is 200 OK + + @skip @team:DataDog/oncall-feature-flags + Scenario: Enable a feature flag in an environment returns "Accepted - Approval required for this change" response + Given there is a valid "feature_flag" in the system + And there is a valid "environment" in the system + And new "EnableFeatureFlagEnvironment" request + And request contains "feature_flag_id" parameter from "feature_flag.data.id" + And request contains "environment_id" parameter from "environment.data.id" + When the request is sent + Then the response status is 202 Accepted - Approval required for this change + + @skip @team:DataDog/oncall-feature-flags + Scenario: Enable a feature flag in an environment returns "Not Found" response + Given new "EnableFeatureFlagEnvironment" request + And request contains "feature_flag_id" parameter with value "00000000-0000-0000-0000-000000000000" + And request contains "environment_id" parameter with value "00000000-0000-0000-0000-000000000001" + When the request is sent + Then the response status is 404 Not Found + + @skip @team:DataDog/oncall-feature-flags + Scenario: Enable a feature flag in an environment returns "OK" response + Given there is a valid "feature_flag" in the system + And there is a valid "environment" in the system + And new "EnableFeatureFlagEnvironment" request + And request contains "feature_flag_id" parameter from "feature_flag.data.id" + And request contains "environment_id" parameter from "environment.data.id" + When the request is sent + Then the response status is 200 OK + + @skip @team:DataDog/oncall-feature-flags + Scenario: Get a feature flag returns "Not Found" response + Given new "GetFeatureFlag" request + And request contains "feature_flag_id" parameter with value "00000000-0000-0000-0000-000000000000" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/oncall-feature-flags + Scenario: Get a feature flag returns "OK" response + Given there is a valid "feature_flag" in the system + And new "GetFeatureFlag" request + And request contains "feature_flag_id" parameter from "feature_flag.data.id" + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.key" has the same value as "feature_flag.data.attributes.key" + And the response "data.attributes.name" has the same value as "feature_flag.data.attributes.name" + And the response "data.attributes.value_type" has the same value as "feature_flag.data.attributes.value_type" + + @skip @team:DataDog/oncall-feature-flags + Scenario: Get an environment returns "Not Found" response + Given new "GetEnvironment" request + And request contains "environment_id" parameter with value "00000000-0000-0000-0000-000000000000" + When the request is sent + Then the response status is 404 Not Found + + @skip @team:DataDog/oncall-feature-flags + Scenario: Get an environment returns "OK" response + Given there is a valid "environment" in the system + And new "GetEnvironment" request + And request contains "environment_id" parameter from "environment.data.id" + When the request is sent + Then the response status is 200 OK + + @skip @team:DataDog/oncall-feature-flags + Scenario: List environments returns "OK" response + Given new "ListEnvironments" request + When the request is sent + Then the response status is 200 OK + + @team:DataDog/oncall-feature-flags + Scenario: List feature flags returns "OK" response + Given new "ListFeatureFlags" request + When the request is sent + Then the response status is 200 OK + + @skip @team:DataDog/oncall-feature-flags + Scenario: Unarchive a feature flag returns "Bad Request" response + Given new "UnarchiveFeatureFlag" request + And request contains "feature_flag_id" parameter with value "00000000-0000-0000-0000-000000000000" + When the request is sent + Then the response status is 400 Bad Request + + @skip @team:DataDog/oncall-feature-flags + Scenario: Unarchive a feature flag returns "Not Found" response + Given new "UnarchiveFeatureFlag" request + And request contains "feature_flag_id" parameter with value "00000000-0000-0000-0000-000000000000" + When the request is sent + Then the response status is 404 Not Found + + @skip @team:DataDog/oncall-feature-flags + Scenario: Unarchive a feature flag returns "OK" response + Given there is a valid "feature_flag" in the system + And new "UnarchiveFeatureFlag" request + And request contains "feature_flag_id" parameter from "feature_flag.data.id" + When the request is sent + Then the response status is 200 OK + + @skip @team:DataDog/oncall-feature-flags + Scenario: Update a feature flag returns "Bad Request" response + Given new "UpdateFeatureFlag" request + And request contains "feature_flag_id" parameter with value "00000000-0000-0000-0000-000000000000" + And body with value {"data": {"type": "feature-flags", "attributes": {"description": "Updated description for the feature flag", "json_schema": "{\"type\": \"object\", \"properties\": {\"enabled\": {\"type\": \"boolean\"}}}", "name": "Updated Feature Flag Name"}}} + When the request is sent + Then the response status is 400 Bad Request + + @skip @team:DataDog/oncall-feature-flags + Scenario: Update a feature flag returns "Not Found" response + Given new "UpdateFeatureFlag" request + And request contains "feature_flag_id" parameter with value "00000000-0000-0000-0000-000000000000" + And body with value {"data": {"type": "feature-flags", "attributes": {"description": "Updated description for the feature flag", "json_schema": "{\"type\": \"object\", \"properties\": {\"enabled\": {\"type\": \"boolean\"}}}", "name": "Updated Feature Flag Name"}}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/oncall-feature-flags + Scenario: Update a feature flag returns "OK" response + Given there is a valid "feature_flag" in the system + And new "UpdateFeatureFlag" request + And request contains "feature_flag_id" parameter from "feature_flag.data.id" + And body with value {"data": {"type": "feature-flags", "attributes": {"description": "Updated description for the feature flag", "name": "Updated Test Feature Flag {{ unique }}"}}} + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.name" is equal to "Updated Test Feature Flag {{ unique }}" + And the response "data.attributes.description" is equal to "Updated description for the feature flag" + + @skip @team:DataDog/oncall-feature-flags + Scenario: Update an environment returns "Bad Request" response + Given new "UpdateEnvironment" request + And request contains "environment_id" parameter with value "00000000-0000-0000-0000-000000000000" + And body with value {"data": {"type": "environments", "attributes": {"description": "Updated staging environment description", "name": "Updated Staging"}}} + When the request is sent + Then the response status is 400 Bad Request + + @skip @team:DataDog/oncall-feature-flags + Scenario: Update an environment returns "Not Found" response + Given new "UpdateEnvironment" request + And request contains "environment_id" parameter with value "00000000-0000-0000-0000-000000000000" + And body with value {"data": {"type": "environments", "attributes": {"description": "Updated staging environment description", "name": "Updated Staging"}}} + When the request is sent + Then the response status is 404 Not Found + + @skip @team:DataDog/oncall-feature-flags + Scenario: Update an environment returns "OK" response + Given there is a valid "environment" in the system + And new "UpdateEnvironment" request + And request contains "environment_id" parameter from "environment.data.id" + And body with value {"data": {"type": "environments", "attributes": {"name": "Updated Test Environment {{ unique }}", "queries": ["updated-{{ unique }}", "live-{{ unique }}"]}}} + When the request is sent + Then the response status is 200 OK diff --git a/features/v2/given.json b/features/v2/given.json index 76980d4ce3dc..5f2234cb4488 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -429,6 +429,30 @@ "tag": "Error Tracking", "operationId": "SearchIssues" }, + { + "parameters": [ + { + "name": "body", + "value": "{\"data\": {\"type\": \"feature-flags\", \"attributes\": {\"key\": \"test-feature-flag-{{ unique }}\", \"name\": \"Test Feature Flag {{ unique }}\", \"description\": \"Test feature flag for BDD scenarios\", \"value_type\": \"BOOLEAN\", \"variants\": [{\"key\": \"variant-{{ unique }}-1\", \"name\": \"Variant {{ unique }} A\", \"value\": \"true\"}, {\"key\": \"variant-{{ unique }}-2\", \"name\": \"Variant {{ unique }} B\", \"value\": \"false\"}]}}}" + } + ], + "step": "there is a valid \"feature_flag\" in the system", + "key": "feature_flag", + "tag": "Feature Flags", + "operationId": "CreateFeatureFlag" + }, + { + "parameters": [ + { + "name": "body", + "value": "{\"data\": {\"type\": \"environments\", \"attributes\": {\"name\": \"Test Environment {{ unique }}\", \"queries\": [\"test-{{ unique }}\", \"env-{{ unique }}\"]}}}" + } + ], + "step": "there is a valid \"environment\" in the system", + "key": "environment", + "tag": "Feature Flags", + "operationId": "CreateEnvironment" + }, { "parameters": [ { diff --git a/features/v2/undo.json b/features/v2/undo.json index a04c9b283b90..0b78314fc511 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -1749,6 +1749,112 @@ "type": "safe" } }, + "ListFeatureFlags": { + "tag": "Feature Flags", + "undo": { + "type": "safe" + } + }, + "CreateFeatureFlag": { + "tag": "Feature Flags", + "undo": { + "operationId": "ArchiveFeatureFlag", + "parameters": [ + { + "name": "feature_flag_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "ListEnvironments": { + "tag": "Feature Flags", + "undo": { + "type": "safe" + } + }, + "CreateEnvironment": { + "tag": "Feature Flags", + "undo": { + "operationId": "DeleteEnvironment", + "parameters": [ + { + "name": "environment_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteEnvironment": { + "tag": "Feature Flags", + "undo": { + "type": "idempotent" + } + }, + "GetEnvironment": { + "tag": "Feature Flags", + "undo": { + "type": "safe" + } + }, + "UpdateEnvironment": { + "tag": "Feature Flags", + "undo": { + "type": "idempotent" + } + }, + "GetFeatureFlag": { + "tag": "Feature Flags", + "undo": { + "type": "safe" + } + }, + "UpdateFeatureFlag": { + "tag": "Feature Flags", + "undo": { + "type": "idempotent" + } + }, + "ArchiveFeatureFlag": { + "tag": "Feature Flags", + "undo": { + "operationId": "UnarchiveFeatureFlag", + "parameters": [ + { + "name": "feature_flag_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DisableFeatureFlagEnvironment": { + "tag": "Feature Flags", + "undo": { + "type": "idempotent" + } + }, + "EnableFeatureFlagEnvironment": { + "tag": "Feature Flags", + "undo": { + "type": "idempotent" + } + }, + "UnarchiveFeatureFlag": { + "tag": "Feature Flags", + "undo": { + "operationId": "ArchiveFeatureFlag", + "parameters": [ + { + "name": "feature_flag_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, "GetHamrOrgConnection": { "tag": "High Availability MultiRegion", "undo": { diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 53171cd9b40d..b9a4c65afb7a 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -1885,6 +1885,14 @@ def overrides "v2.create_deployment_rule_params_data" => "CreateDeploymentRuleParamsData", "v2.create_deployment_rule_params_data_attributes" => "CreateDeploymentRuleParamsDataAttributes", "v2.create_email_notification_channel_config" => "CreateEmailNotificationChannelConfig", + "v2.create_environment_attributes" => "CreateEnvironmentAttributes", + "v2.create_environment_data" => "CreateEnvironmentData", + "v2.create_environment_data_type" => "CreateEnvironmentDataType", + "v2.create_environment_request" => "CreateEnvironmentRequest", + "v2.create_feature_flag_attributes" => "CreateFeatureFlagAttributes", + "v2.create_feature_flag_data" => "CreateFeatureFlagData", + "v2.create_feature_flag_data_type" => "CreateFeatureFlagDataType", + "v2.create_feature_flag_request" => "CreateFeatureFlagRequest", "v2.create_incident_notification_rule_request" => "CreateIncidentNotificationRuleRequest", "v2.create_incident_notification_template_request" => "CreateIncidentNotificationTemplateRequest", "v2.create_jira_issue_request_array" => "CreateJiraIssueRequestArray", @@ -1964,6 +1972,7 @@ def overrides "v2.create_upload_response_data_attributes" => "CreateUploadResponseDataAttributes", "v2.create_upload_response_data_type" => "CreateUploadResponseDataType", "v2.create_user_notification_channel_request" => "CreateUserNotificationChannelRequest", + "v2.create_variant" => "CreateVariant", "v2.create_workflow_request" => "CreateWorkflowRequest", "v2.create_workflow_response" => "CreateWorkflowResponse", "v2.creator" => "Creator", @@ -2379,6 +2388,11 @@ def overrides "v2.entity_v3_system_datadog" => "EntityV3SystemDatadog", "v2.entity_v3_system_kind" => "EntityV3SystemKind", "v2.entity_v3_system_spec" => "EntityV3SystemSpec", + "v2.environment" => "Environment", + "v2.environment_attributes" => "EnvironmentAttributes", + "v2.environment_response" => "EnvironmentResponse", + "v2.environments_pagination_meta" => "EnvironmentsPaginationMeta", + "v2.environments_pagination_meta_page" => "EnvironmentsPaginationMetaPage", "v2.epss" => "EPSS", "v2.error_handler" => "ErrorHandler", "v2.escalation" => "Escalation", @@ -2504,6 +2518,13 @@ def overrides "v2.fastly_service_response" => "FastlyServiceResponse", "v2.fastly_services_response" => "FastlyServicesResponse", "v2.fastly_service_type" => "FastlyServiceType", + "v2.feature_flag" => "FeatureFlag", + "v2.feature_flag_attributes" => "FeatureFlagAttributes", + "v2.feature_flag_environment" => "FeatureFlagEnvironment", + "v2.feature_flag_response" => "FeatureFlagResponse", + "v2.feature_flags_pagination_meta" => "FeatureFlagsPaginationMeta", + "v2.feature_flags_pagination_meta_page" => "FeatureFlagsPaginationMetaPage", + "v2.feature_flag_status" => "FeatureFlagStatus", "v2.filters_per_product" => "FiltersPerProduct", "v2.finding" => "Finding", "v2.finding_attributes" => "FindingAttributes", @@ -3186,6 +3207,8 @@ def overrides "v2.list_entity_catalog_response" => "ListEntityCatalogResponse", "v2.list_entity_catalog_response_included_item" => "ListEntityCatalogResponseIncludedItem", "v2.list_entity_catalog_response_links" => "ListEntityCatalogResponseLinks", + "v2.list_environments_response" => "ListEnvironmentsResponse", + "v2.list_feature_flags_response" => "ListFeatureFlagsResponse", "v2.list_findings_meta" => "ListFindingsMeta", "v2.list_findings_page" => "ListFindingsPage", "v2.list_findings_response" => "ListFindingsResponse", @@ -5393,6 +5416,14 @@ def overrides "v2.update_deployment_rule_params" => "UpdateDeploymentRuleParams", "v2.update_deployment_rule_params_data" => "UpdateDeploymentRuleParamsData", "v2.update_deployment_rule_params_data_attributes" => "UpdateDeploymentRuleParamsDataAttributes", + "v2.update_environment_attributes" => "UpdateEnvironmentAttributes", + "v2.update_environment_data" => "UpdateEnvironmentData", + "v2.update_environment_data_type" => "UpdateEnvironmentDataType", + "v2.update_environment_request" => "UpdateEnvironmentRequest", + "v2.update_feature_flag_attributes" => "UpdateFeatureFlagAttributes", + "v2.update_feature_flag_data" => "UpdateFeatureFlagData", + "v2.update_feature_flag_data_type" => "UpdateFeatureFlagDataType", + "v2.update_feature_flag_request" => "UpdateFeatureFlagRequest", "v2.update_flaky_tests_request" => "UpdateFlakyTestsRequest", "v2.update_flaky_tests_request_attributes" => "UpdateFlakyTestsRequestAttributes", "v2.update_flaky_tests_request_data" => "UpdateFlakyTestsRequestData", @@ -5513,6 +5544,8 @@ def overrides "v2.validation_error" => "ValidationError", "v2.validation_error_meta" => "ValidationErrorMeta", "v2.validation_response" => "ValidationResponse", + "v2.value_type" => "ValueType", + "v2.variant" => "Variant", "v2.version_history_update" => "VersionHistoryUpdate", "v2.version_history_update_type" => "VersionHistoryUpdateType", "v2.viewership_history_session_array" => "ViewershipHistorySessionArray", @@ -5652,6 +5685,7 @@ def overrides "v2.error_tracking_api" => "ErrorTrackingAPI", "v2.events_api" => "EventsAPI", "v2.fastly_integration_api" => "FastlyIntegrationAPI", + "v2.feature_flags_api" => "FeatureFlagsAPI", "v2.fleet_automation_api" => "FleetAutomationAPI", "v2.gcp_integration_api" => "GCPIntegrationAPI", "v2.google_chat_integration_api" => "GoogleChatIntegrationAPI", diff --git a/lib/datadog_api_client/v2/api/feature_flags_api.rb b/lib/datadog_api_client/v2/api/feature_flags_api.rb new file mode 100644 index 000000000000..7ef2b11dea3a --- /dev/null +++ b/lib/datadog_api_client/v2/api/feature_flags_api.rb @@ -0,0 +1,930 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'cgi' + +module DatadogAPIClient::V2 + class FeatureFlagsAPI + attr_accessor :api_client + + def initialize(api_client = DatadogAPIClient::APIClient.default) + @api_client = api_client + end + + # Archive a feature flag. + # + # @see #archive_feature_flag_with_http_info + def archive_feature_flag(feature_flag_id, opts = {}) + data, _status_code, _headers = archive_feature_flag_with_http_info(feature_flag_id, opts) + data + end + + # Archive a feature flag. + # + # Archives a feature flag. Archived flags are + # hidden from the main list but remain accessible and can be unarchived. + # + # @param feature_flag_id [UUID] The ID of the feature flag. + # @param opts [Hash] the optional parameters + # @return [Array<(FeatureFlagResponse, Integer, Hash)>] FeatureFlagResponse data, response status code and response headers + def archive_feature_flag_with_http_info(feature_flag_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FeatureFlagsAPI.archive_feature_flag ...' + end + # verify the required parameter 'feature_flag_id' is set + if @api_client.config.client_side_validation && feature_flag_id.nil? + fail ArgumentError, "Missing the required parameter 'feature_flag_id' when calling FeatureFlagsAPI.archive_feature_flag" + end + # resource path + local_var_path = '/api/v2/feature-flags/{feature_flag_id}/archive'.sub('{feature_flag_id}', CGI.escape(feature_flag_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'FeatureFlagResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :archive_feature_flag, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FeatureFlagsAPI#archive_feature_flag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Create an environment. + # + # @see #create_environment_with_http_info + def create_environment(body, opts = {}) + data, _status_code, _headers = create_environment_with_http_info(body, opts) + data + end + + # Create an environment. + # + # Creates a new environment for organizing feature flags. + # + # @param body [CreateEnvironmentRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(EnvironmentResponse, Integer, Hash)>] EnvironmentResponse data, response status code and response headers + def create_environment_with_http_info(body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FeatureFlagsAPI.create_environment ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling FeatureFlagsAPI.create_environment" + end + # resource path + local_var_path = '/api/v2/feature-flags/environments' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'EnvironmentResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :create_environment, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FeatureFlagsAPI#create_environment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Create a feature flag. + # + # @see #create_feature_flag_with_http_info + def create_feature_flag(body, opts = {}) + data, _status_code, _headers = create_feature_flag_with_http_info(body, opts) + data + end + + # Create a feature flag. + # + # Creates a new feature flag with variants. + # + # @param body [CreateFeatureFlagRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(FeatureFlagResponse, Integer, Hash)>] FeatureFlagResponse data, response status code and response headers + def create_feature_flag_with_http_info(body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FeatureFlagsAPI.create_feature_flag ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling FeatureFlagsAPI.create_feature_flag" + end + # resource path + local_var_path = '/api/v2/feature-flags' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'FeatureFlagResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :create_feature_flag, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FeatureFlagsAPI#create_feature_flag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete an environment. + # + # @see #delete_environment_with_http_info + def delete_environment(environment_id, opts = {}) + delete_environment_with_http_info(environment_id, opts) + nil + end + + # Delete an environment. + # + # Deletes an environment. This operation cannot be undone. + # + # @param environment_id [UUID] The ID of the environment. + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_environment_with_http_info(environment_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FeatureFlagsAPI.delete_environment ...' + end + # verify the required parameter 'environment_id' is set + if @api_client.config.client_side_validation && environment_id.nil? + fail ArgumentError, "Missing the required parameter 'environment_id' when calling FeatureFlagsAPI.delete_environment" + end + # resource path + local_var_path = '/api/v2/feature-flags/environments/{environment_id}'.sub('{environment_id}', CGI.escape(environment_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :delete_environment, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FeatureFlagsAPI#delete_environment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Disable a feature flag in an environment. + # + # @see #disable_feature_flag_environment_with_http_info + def disable_feature_flag_environment(feature_flag_id, environment_id, opts = {}) + disable_feature_flag_environment_with_http_info(feature_flag_id, environment_id, opts) + nil + end + + # Disable a feature flag in an environment. + # + # Disable a feature flag in a specific environment. + # + # @param feature_flag_id [UUID] The ID of the feature flag. + # @param environment_id [UUID] The ID of the environment. + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def disable_feature_flag_environment_with_http_info(feature_flag_id, environment_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FeatureFlagsAPI.disable_feature_flag_environment ...' + end + # verify the required parameter 'feature_flag_id' is set + if @api_client.config.client_side_validation && feature_flag_id.nil? + fail ArgumentError, "Missing the required parameter 'feature_flag_id' when calling FeatureFlagsAPI.disable_feature_flag_environment" + end + # verify the required parameter 'environment_id' is set + if @api_client.config.client_side_validation && environment_id.nil? + fail ArgumentError, "Missing the required parameter 'environment_id' when calling FeatureFlagsAPI.disable_feature_flag_environment" + end + # resource path + local_var_path = '/api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/disable'.sub('{feature_flag_id}', CGI.escape(feature_flag_id.to_s).gsub('%2F', '/')).sub('{environment_id}', CGI.escape(environment_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :disable_feature_flag_environment, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FeatureFlagsAPI#disable_feature_flag_environment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Enable a feature flag in an environment. + # + # @see #enable_feature_flag_environment_with_http_info + def enable_feature_flag_environment(feature_flag_id, environment_id, opts = {}) + enable_feature_flag_environment_with_http_info(feature_flag_id, environment_id, opts) + nil + end + + # Enable a feature flag in an environment. + # + # Enable a feature flag in a specific environment. + # + # @param feature_flag_id [UUID] The ID of the feature flag. + # @param environment_id [UUID] The ID of the environment. + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def enable_feature_flag_environment_with_http_info(feature_flag_id, environment_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FeatureFlagsAPI.enable_feature_flag_environment ...' + end + # verify the required parameter 'feature_flag_id' is set + if @api_client.config.client_side_validation && feature_flag_id.nil? + fail ArgumentError, "Missing the required parameter 'feature_flag_id' when calling FeatureFlagsAPI.enable_feature_flag_environment" + end + # verify the required parameter 'environment_id' is set + if @api_client.config.client_side_validation && environment_id.nil? + fail ArgumentError, "Missing the required parameter 'environment_id' when calling FeatureFlagsAPI.enable_feature_flag_environment" + end + # resource path + local_var_path = '/api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/enable'.sub('{feature_flag_id}', CGI.escape(feature_flag_id.to_s).gsub('%2F', '/')).sub('{environment_id}', CGI.escape(environment_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :enable_feature_flag_environment, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FeatureFlagsAPI#enable_feature_flag_environment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get an environment. + # + # @see #get_environment_with_http_info + def get_environment(environment_id, opts = {}) + data, _status_code, _headers = get_environment_with_http_info(environment_id, opts) + data + end + + # Get an environment. + # + # Returns the details of a specific environment. + # + # @param environment_id [UUID] The ID of the environment. + # @param opts [Hash] the optional parameters + # @return [Array<(EnvironmentResponse, Integer, Hash)>] EnvironmentResponse data, response status code and response headers + def get_environment_with_http_info(environment_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FeatureFlagsAPI.get_environment ...' + end + # verify the required parameter 'environment_id' is set + if @api_client.config.client_side_validation && environment_id.nil? + fail ArgumentError, "Missing the required parameter 'environment_id' when calling FeatureFlagsAPI.get_environment" + end + # resource path + local_var_path = '/api/v2/feature-flags/environments/{environment_id}'.sub('{environment_id}', CGI.escape(environment_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'EnvironmentResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :get_environment, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FeatureFlagsAPI#get_environment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get a feature flag. + # + # @see #get_feature_flag_with_http_info + def get_feature_flag(feature_flag_id, opts = {}) + data, _status_code, _headers = get_feature_flag_with_http_info(feature_flag_id, opts) + data + end + + # Get a feature flag. + # + # Returns the details of a specific feature flag + # including variants and environment status. + # + # @param feature_flag_id [UUID] The ID of the feature flag. + # @param opts [Hash] the optional parameters + # @return [Array<(FeatureFlagResponse, Integer, Hash)>] FeatureFlagResponse data, response status code and response headers + def get_feature_flag_with_http_info(feature_flag_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FeatureFlagsAPI.get_feature_flag ...' + end + # verify the required parameter 'feature_flag_id' is set + if @api_client.config.client_side_validation && feature_flag_id.nil? + fail ArgumentError, "Missing the required parameter 'feature_flag_id' when calling FeatureFlagsAPI.get_feature_flag" + end + # resource path + local_var_path = '/api/v2/feature-flags/{feature_flag_id}'.sub('{feature_flag_id}', CGI.escape(feature_flag_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'FeatureFlagResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :get_feature_flag, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FeatureFlagsAPI#get_feature_flag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List environments. + # + # @see #list_environments_with_http_info + def list_environments(opts = {}) + data, _status_code, _headers = list_environments_with_http_info(opts) + data + end + + # List environments. + # + # Returns a list of environments for the organization. + # Supports filtering by name and key. + # + # @param opts [Hash] the optional parameters + # @option opts [String] :name Filter environments by name (partial matching). + # @option opts [String] :key Filter environments by key (partial matching). + # @option opts [Integer] :limit Maximum number of results to return. + # @option opts [Integer] :offset Number of results to skip. + # @return [Array<(ListEnvironmentsResponse, Integer, Hash)>] ListEnvironmentsResponse data, response status code and response headers + def list_environments_with_http_info(opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FeatureFlagsAPI.list_environments ...' + end + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 1000 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling FeatureFlagsAPI.list_environments, must be smaller than or equal to 1000.' + end + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling FeatureFlagsAPI.list_environments, must be greater than or equal to 1.' + end + if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 + fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling FeatureFlagsAPI.list_environments, must be greater than or equal to 0.' + end + # resource path + local_var_path = '/api/v2/feature-flags/environments' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil? + query_params[:'key'] = opts[:'key'] if !opts[:'key'].nil? + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ListEnvironmentsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :list_environments, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FeatureFlagsAPI#list_environments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List feature flags. + # + # @see #list_feature_flags_with_http_info + def list_feature_flags(opts = {}) + data, _status_code, _headers = list_feature_flags_with_http_info(opts) + data + end + + # List feature flags. + # + # Returns a list of feature flags for the organization. + # Supports filtering by key and archived status. + # + # @param opts [Hash] the optional parameters + # @option opts [String] :key Filter feature flags by key (partial matching). + # @option opts [Boolean] :is_archived Filter by archived status. + # @option opts [Integer] :limit Maximum number of results to return. + # @option opts [Integer] :offset Number of results to skip. + # @return [Array<(ListFeatureFlagsResponse, Integer, Hash)>] ListFeatureFlagsResponse data, response status code and response headers + def list_feature_flags_with_http_info(opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FeatureFlagsAPI.list_feature_flags ...' + end + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 1000 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling FeatureFlagsAPI.list_feature_flags, must be smaller than or equal to 1000.' + end + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling FeatureFlagsAPI.list_feature_flags, must be greater than or equal to 1.' + end + if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 + fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling FeatureFlagsAPI.list_feature_flags, must be greater than or equal to 0.' + end + # resource path + local_var_path = '/api/v2/feature-flags' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'key'] = opts[:'key'] if !opts[:'key'].nil? + query_params[:'is_archived'] = opts[:'is_archived'] if !opts[:'is_archived'].nil? + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ListFeatureFlagsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :list_feature_flags, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FeatureFlagsAPI#list_feature_flags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Unarchive a feature flag. + # + # @see #unarchive_feature_flag_with_http_info + def unarchive_feature_flag(feature_flag_id, opts = {}) + data, _status_code, _headers = unarchive_feature_flag_with_http_info(feature_flag_id, opts) + data + end + + # Unarchive a feature flag. + # + # Unarchives a previously archived feature flag, + # making it visible in the main list again. + # + # @param feature_flag_id [UUID] The ID of the feature flag. + # @param opts [Hash] the optional parameters + # @return [Array<(FeatureFlagResponse, Integer, Hash)>] FeatureFlagResponse data, response status code and response headers + def unarchive_feature_flag_with_http_info(feature_flag_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FeatureFlagsAPI.unarchive_feature_flag ...' + end + # verify the required parameter 'feature_flag_id' is set + if @api_client.config.client_side_validation && feature_flag_id.nil? + fail ArgumentError, "Missing the required parameter 'feature_flag_id' when calling FeatureFlagsAPI.unarchive_feature_flag" + end + # resource path + local_var_path = '/api/v2/feature-flags/{feature_flag_id}/unarchive'.sub('{feature_flag_id}', CGI.escape(feature_flag_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'FeatureFlagResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :unarchive_feature_flag, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FeatureFlagsAPI#unarchive_feature_flag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update an environment. + # + # @see #update_environment_with_http_info + def update_environment(environment_id, body, opts = {}) + data, _status_code, _headers = update_environment_with_http_info(environment_id, body, opts) + data + end + + # Update an environment. + # + # Updates an existing environment's metadata such as + # name and description. + # + # @param environment_id [UUID] The ID of the environment. + # @param body [UpdateEnvironmentRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(EnvironmentResponse, Integer, Hash)>] EnvironmentResponse data, response status code and response headers + def update_environment_with_http_info(environment_id, body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FeatureFlagsAPI.update_environment ...' + end + # verify the required parameter 'environment_id' is set + if @api_client.config.client_side_validation && environment_id.nil? + fail ArgumentError, "Missing the required parameter 'environment_id' when calling FeatureFlagsAPI.update_environment" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling FeatureFlagsAPI.update_environment" + end + # resource path + local_var_path = '/api/v2/feature-flags/environments/{environment_id}'.sub('{environment_id}', CGI.escape(environment_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'EnvironmentResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :update_environment, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FeatureFlagsAPI#update_environment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update a feature flag. + # + # @see #update_feature_flag_with_http_info + def update_feature_flag(feature_flag_id, body, opts = {}) + data, _status_code, _headers = update_feature_flag_with_http_info(feature_flag_id, body, opts) + data + end + + # Update a feature flag. + # + # Updates an existing feature flag's metadata such as + # name and description. Does not modify targeting rules or allocations. + # + # @param feature_flag_id [UUID] The ID of the feature flag. + # @param body [UpdateFeatureFlagRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(FeatureFlagResponse, Integer, Hash)>] FeatureFlagResponse data, response status code and response headers + def update_feature_flag_with_http_info(feature_flag_id, body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FeatureFlagsAPI.update_feature_flag ...' + end + # verify the required parameter 'feature_flag_id' is set + if @api_client.config.client_side_validation && feature_flag_id.nil? + fail ArgumentError, "Missing the required parameter 'feature_flag_id' when calling FeatureFlagsAPI.update_feature_flag" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling FeatureFlagsAPI.update_feature_flag" + end + # resource path + local_var_path = '/api/v2/feature-flags/{feature_flag_id}'.sub('{feature_flag_id}', CGI.escape(feature_flag_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'FeatureFlagResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :update_feature_flag, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FeatureFlagsAPI#update_feature_flag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/datadog_api_client/v2/api/security_monitoring_api.rb b/lib/datadog_api_client/v2/api/security_monitoring_api.rb index 3192e46a021f..c185ce633926 100644 --- a/lib/datadog_api_client/v2/api/security_monitoring_api.rb +++ b/lib/datadog_api_client/v2/api/security_monitoring_api.rb @@ -4326,6 +4326,7 @@ def list_security_monitoring_critical_assets(opts = {}) # Get the list of all critical assets. # # @param opts [Hash] the optional parameters + # @option opts [String] :query Query string. # @return [Array<(SecurityMonitoringCriticalAssetsResponse, Integer, Hash)>] SecurityMonitoringCriticalAssetsResponse data, response status code and response headers def list_security_monitoring_critical_assets_with_http_info(opts = {}) @@ -4337,6 +4338,7 @@ def list_security_monitoring_critical_assets_with_http_info(opts = {}) # query parameters query_params = opts[:query_params] || {} + query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil? # header parameters header_params = opts[:header_params] || {} diff --git a/lib/datadog_api_client/v2/models/create_environment_attributes.rb b/lib/datadog_api_client/v2/models/create_environment_attributes.rb new file mode 100644 index 000000000000..54d0cd68b707 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_environment_attributes.rb @@ -0,0 +1,170 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes for creating a new environment. + class CreateEnvironmentAttributes + include BaseGenericModel + + # Indicates whether this is a production environment. + attr_accessor :is_production + + # The name of the environment. + attr_reader :name + + # List of queries to define the environment scope. + attr_reader :queries + + # Indicates whether feature flag changes require approval in this environment. + attr_accessor :require_feature_flag_approval + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'is_production' => :'is_production', + :'name' => :'name', + :'queries' => :'queries', + :'require_feature_flag_approval' => :'require_feature_flag_approval' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'is_production' => :'Boolean', + :'name' => :'String', + :'queries' => :'Array', + :'require_feature_flag_approval' => :'Boolean' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateEnvironmentAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'is_production') + self.is_production = attributes[:'is_production'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'queries') + if (value = attributes[:'queries']).is_a?(Array) + self.queries = value + end + end + + if attributes.key?(:'require_feature_flag_approval') + self.require_feature_flag_approval = attributes[:'require_feature_flag_approval'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @name.nil? + return false if @queries.nil? + return false if @queries.length < 1 + true + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param queries [Object] Object to be assigned + # @!visibility private + def queries=(queries) + if queries.nil? + fail ArgumentError, 'invalid value for "queries", queries cannot be nil.' + end + if queries.length < 1 + fail ArgumentError, 'invalid value for "queries", number of items must be greater than or equal to 1.' + end + @queries = queries + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + is_production == o.is_production && + name == o.name && + queries == o.queries && + require_feature_flag_approval == o.require_feature_flag_approval && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [is_production, name, queries, require_feature_flag_approval, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_environment_data.rb b/lib/datadog_api_client/v2/models/create_environment_data.rb new file mode 100644 index 000000000000..ed04c49096f0 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_environment_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data for creating a new environment. + class CreateEnvironmentData + include BaseGenericModel + + # Attributes for creating a new environment. + attr_reader :attributes + + # The resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'CreateEnvironmentAttributes', + :'type' => :'CreateEnvironmentDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateEnvironmentData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_environment_data_type.rb b/lib/datadog_api_client/v2/models/create_environment_data_type.rb new file mode 100644 index 000000000000..309d631eb0a5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_environment_data_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The resource type. + class CreateEnvironmentDataType + include BaseEnumModel + + ENVIRONMENTS = "environments".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/create_environment_request.rb b/lib/datadog_api_client/v2/models/create_environment_request.rb new file mode 100644 index 000000000000..8d5fdabec1d4 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_environment_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request to create a new environment. + class CreateEnvironmentRequest + include BaseGenericModel + + # Data for creating a new environment. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'CreateEnvironmentData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateEnvironmentRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_feature_flag_attributes.rb b/lib/datadog_api_client/v2/models/create_feature_flag_attributes.rb new file mode 100644 index 000000000000..c0cade510c1d --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_feature_flag_attributes.rb @@ -0,0 +1,238 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes for creating a new feature flag. + class CreateFeatureFlagAttributes + include BaseGenericModel + + # The key of the default variant. + attr_accessor :default_variant_key + + # The description of the feature flag. + attr_reader :description + + # JSON schema for validation when value_type is JSON. + attr_accessor :json_schema + + # The unique key of the feature flag. + attr_reader :key + + # The name of the feature flag. + attr_reader :name + + # The type of values for the feature flag variants. + attr_reader :value_type + + # The variants of the feature flag. + attr_reader :variants + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'default_variant_key' => :'default_variant_key', + :'description' => :'description', + :'json_schema' => :'json_schema', + :'key' => :'key', + :'name' => :'name', + :'value_type' => :'value_type', + :'variants' => :'variants' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'default_variant_key' => :'String', + :'description' => :'String', + :'json_schema' => :'String', + :'key' => :'String', + :'name' => :'String', + :'value_type' => :'ValueType', + :'variants' => :'Array' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'default_variant_key', + :'json_schema', + ]) + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateFeatureFlagAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'default_variant_key') + self.default_variant_key = attributes[:'default_variant_key'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'json_schema') + self.json_schema = attributes[:'json_schema'] + end + + if attributes.key?(:'key') + self.key = attributes[:'key'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'value_type') + self.value_type = attributes[:'value_type'] + end + + if attributes.key?(:'variants') + if (value = attributes[:'variants']).is_a?(Array) + self.variants = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @description.nil? + return false if @key.nil? + return false if @name.nil? + return false if @value_type.nil? + return false if @variants.nil? + true + end + + # Custom attribute writer method with validation + # @param description [Object] Object to be assigned + # @!visibility private + def description=(description) + if description.nil? + fail ArgumentError, 'invalid value for "description", description cannot be nil.' + end + @description = description + end + + # Custom attribute writer method with validation + # @param key [Object] Object to be assigned + # @!visibility private + def key=(key) + if key.nil? + fail ArgumentError, 'invalid value for "key", key cannot be nil.' + end + @key = key + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param value_type [Object] Object to be assigned + # @!visibility private + def value_type=(value_type) + if value_type.nil? + fail ArgumentError, 'invalid value for "value_type", value_type cannot be nil.' + end + @value_type = value_type + end + + # Custom attribute writer method with validation + # @param variants [Object] Object to be assigned + # @!visibility private + def variants=(variants) + if variants.nil? + fail ArgumentError, 'invalid value for "variants", variants cannot be nil.' + end + @variants = variants + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + default_variant_key == o.default_variant_key && + description == o.description && + json_schema == o.json_schema && + key == o.key && + name == o.name && + value_type == o.value_type && + variants == o.variants && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [default_variant_key, description, json_schema, key, name, value_type, variants, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_feature_flag_data.rb b/lib/datadog_api_client/v2/models/create_feature_flag_data.rb new file mode 100644 index 000000000000..aa4bcc464a4b --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_feature_flag_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data for creating a new feature flag. + class CreateFeatureFlagData + include BaseGenericModel + + # Attributes for creating a new feature flag. + attr_reader :attributes + + # The resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'CreateFeatureFlagAttributes', + :'type' => :'CreateFeatureFlagDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateFeatureFlagData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_feature_flag_data_type.rb b/lib/datadog_api_client/v2/models/create_feature_flag_data_type.rb new file mode 100644 index 000000000000..25dea47e0855 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_feature_flag_data_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The resource type. + class CreateFeatureFlagDataType + include BaseEnumModel + + FEATURE_FLAGS = "feature-flags".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/create_feature_flag_request.rb b/lib/datadog_api_client/v2/models/create_feature_flag_request.rb new file mode 100644 index 000000000000..0fd3f8113b1c --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_feature_flag_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request to create a new feature flag. + class CreateFeatureFlagRequest + include BaseGenericModel + + # Data for creating a new feature flag. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'CreateFeatureFlagData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateFeatureFlagRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_variant.rb b/lib/datadog_api_client/v2/models/create_variant.rb new file mode 100644 index 000000000000..a18d682fbad4 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_variant.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request to create a variant. + class CreateVariant + include BaseGenericModel + + # The unique key of the variant. + attr_reader :key + + # The name of the variant. + attr_reader :name + + # The value of the variant as a string. + attr_reader :value + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'key' => :'key', + :'name' => :'name', + :'value' => :'value' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'key' => :'String', + :'name' => :'String', + :'value' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateVariant` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'key') + self.key = attributes[:'key'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @key.nil? + return false if @name.nil? + return false if @value.nil? + true + end + + # Custom attribute writer method with validation + # @param key [Object] Object to be assigned + # @!visibility private + def key=(key) + if key.nil? + fail ArgumentError, 'invalid value for "key", key cannot be nil.' + end + @key = key + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param value [Object] Object to be assigned + # @!visibility private + def value=(value) + if value.nil? + fail ArgumentError, 'invalid value for "value", value cannot be nil.' + end + @value = value + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + key == o.key && + name == o.name && + value == o.value && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [key, name, value, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/environment.rb b/lib/datadog_api_client/v2/models/environment.rb new file mode 100644 index 000000000000..5b0f0f47c8a7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/environment.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A feature flag environment resource. + class Environment + include BaseGenericModel + + # Attributes of an environment. + attr_reader :attributes + + # The unique identifier of the environment. + attr_reader :id + + # The resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'EnvironmentAttributes', + :'id' => :'UUID', + :'type' => :'CreateEnvironmentDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::Environment` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/environment_attributes.rb b/lib/datadog_api_client/v2/models/environment_attributes.rb new file mode 100644 index 000000000000..b3b11a6701c3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/environment_attributes.rb @@ -0,0 +1,214 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of an environment. + class EnvironmentAttributes + include BaseGenericModel + + # The timestamp when the environment was created. + attr_accessor :created_at + + # The description of the environment. + attr_accessor :description + + # Indicates whether this is a production environment. + attr_accessor :is_production + + # The unique key of the environment. + attr_accessor :key + + # The name of the environment. + attr_reader :name + + # List of queries to define the environment scope. + attr_reader :queries + + # Indicates whether feature flag changes require approval in this environment. + attr_accessor :require_feature_flag_approval + + # The timestamp when the environment was last updated. + attr_accessor :updated_at + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'created_at' => :'created_at', + :'description' => :'description', + :'is_production' => :'is_production', + :'key' => :'key', + :'name' => :'name', + :'queries' => :'queries', + :'require_feature_flag_approval' => :'require_feature_flag_approval', + :'updated_at' => :'updated_at' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'created_at' => :'Time', + :'description' => :'String', + :'is_production' => :'Boolean', + :'key' => :'String', + :'name' => :'String', + :'queries' => :'Array', + :'require_feature_flag_approval' => :'Boolean', + :'updated_at' => :'Time' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'description', + ]) + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EnvironmentAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'is_production') + self.is_production = attributes[:'is_production'] + end + + if attributes.key?(:'key') + self.key = attributes[:'key'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'queries') + if (value = attributes[:'queries']).is_a?(Array) + self.queries = value + end + end + + if attributes.key?(:'require_feature_flag_approval') + self.require_feature_flag_approval = attributes[:'require_feature_flag_approval'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @name.nil? + return false if !@queries.nil? && @queries.length < 1 + true + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param queries [Object] Object to be assigned + # @!visibility private + def queries=(queries) + if !queries.nil? && queries.length < 1 + fail ArgumentError, 'invalid value for "queries", number of items must be greater than or equal to 1.' + end + @queries = queries + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + created_at == o.created_at && + description == o.description && + is_production == o.is_production && + key == o.key && + name == o.name && + queries == o.queries && + require_feature_flag_approval == o.require_feature_flag_approval && + updated_at == o.updated_at && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [created_at, description, is_production, key, name, queries, require_feature_flag_approval, updated_at, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/environment_response.rb b/lib/datadog_api_client/v2/models/environment_response.rb new file mode 100644 index 000000000000..5a1c7df881c9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/environment_response.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response containing an environment. + class EnvironmentResponse + include BaseGenericModel + + # A feature flag environment resource. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Environment' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EnvironmentResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/environments_pagination_meta.rb b/lib/datadog_api_client/v2/models/environments_pagination_meta.rb new file mode 100644 index 000000000000..23e70024a5fe --- /dev/null +++ b/lib/datadog_api_client/v2/models/environments_pagination_meta.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Pagination metadata for environments. + class EnvironmentsPaginationMeta + include BaseGenericModel + + # + attr_accessor :page + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'page' => :'page' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'page' => :'EnvironmentsPaginationMetaPage' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EnvironmentsPaginationMeta` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'page') + self.page = attributes[:'page'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + page == o.page && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [page, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/environments_pagination_meta_page.rb b/lib/datadog_api_client/v2/models/environments_pagination_meta_page.rb new file mode 100644 index 000000000000..444216fcd97d --- /dev/null +++ b/lib/datadog_api_client/v2/models/environments_pagination_meta_page.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class EnvironmentsPaginationMetaPage + include BaseGenericModel + + # Total number of items. + attr_accessor :total_count + + # Total number of items matching the filter. + attr_accessor :total_filtered_count + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'total_count' => :'total_count', + :'total_filtered_count' => :'total_filtered_count' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'total_count' => :'Integer', + :'total_filtered_count' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EnvironmentsPaginationMetaPage` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'total_count') + self.total_count = attributes[:'total_count'] + end + + if attributes.key?(:'total_filtered_count') + self.total_filtered_count = attributes[:'total_filtered_count'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + total_count == o.total_count && + total_filtered_count == o.total_filtered_count && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [total_count, total_filtered_count, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/feature_flag.rb b/lib/datadog_api_client/v2/models/feature_flag.rb new file mode 100644 index 000000000000..15ac650397fe --- /dev/null +++ b/lib/datadog_api_client/v2/models/feature_flag.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A feature flag resource. + class FeatureFlag + include BaseGenericModel + + # Attributes of a feature flag. + attr_reader :attributes + + # The unique identifier of the feature flag. + attr_reader :id + + # The resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'FeatureFlagAttributes', + :'id' => :'UUID', + :'type' => :'CreateFeatureFlagDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FeatureFlag` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/feature_flag_attributes.rb b/lib/datadog_api_client/v2/models/feature_flag_attributes.rb new file mode 100644 index 000000000000..71a26404a6ad --- /dev/null +++ b/lib/datadog_api_client/v2/models/feature_flag_attributes.rb @@ -0,0 +1,310 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of a feature flag. + class FeatureFlagAttributes + include BaseGenericModel + + # The timestamp when the feature flag was archived. + attr_accessor :archived_at + + # The timestamp when the feature flag was created. + attr_accessor :created_at + + # The ID of the user who created the feature flag. + attr_accessor :created_by + + # The description of the feature flag. + attr_reader :description + + # Distribution channel for the feature flag. + attr_accessor :distribution_channel + + # Environment-specific settings for the feature flag. + attr_accessor :feature_flag_environments + + # JSON schema for validation when value_type is JSON. + attr_accessor :json_schema + + # The unique key of the feature flag. + attr_reader :key + + # The ID of the user who last updated the feature flag. + attr_accessor :last_updated_by + + # The name of the feature flag. + attr_reader :name + + # Indicates whether this feature flag requires approval for changes. + attr_accessor :require_approval + + # The timestamp when the feature flag was last updated. + attr_accessor :updated_at + + # The type of values for the feature flag variants. + attr_reader :value_type + + # The variants of the feature flag. + attr_reader :variants + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'archived_at' => :'archived_at', + :'created_at' => :'created_at', + :'created_by' => :'created_by', + :'description' => :'description', + :'distribution_channel' => :'distribution_channel', + :'feature_flag_environments' => :'feature_flag_environments', + :'json_schema' => :'json_schema', + :'key' => :'key', + :'last_updated_by' => :'last_updated_by', + :'name' => :'name', + :'require_approval' => :'require_approval', + :'updated_at' => :'updated_at', + :'value_type' => :'value_type', + :'variants' => :'variants' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'archived_at' => :'Time', + :'created_at' => :'Time', + :'created_by' => :'UUID', + :'description' => :'String', + :'distribution_channel' => :'String', + :'feature_flag_environments' => :'Array', + :'json_schema' => :'String', + :'key' => :'String', + :'last_updated_by' => :'UUID', + :'name' => :'String', + :'require_approval' => :'Boolean', + :'updated_at' => :'Time', + :'value_type' => :'ValueType', + :'variants' => :'Array' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'archived_at', + :'json_schema', + ]) + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FeatureFlagAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'archived_at') + self.archived_at = attributes[:'archived_at'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'created_by') + self.created_by = attributes[:'created_by'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'distribution_channel') + self.distribution_channel = attributes[:'distribution_channel'] + end + + if attributes.key?(:'feature_flag_environments') + if (value = attributes[:'feature_flag_environments']).is_a?(Array) + self.feature_flag_environments = value + end + end + + if attributes.key?(:'json_schema') + self.json_schema = attributes[:'json_schema'] + end + + if attributes.key?(:'key') + self.key = attributes[:'key'] + end + + if attributes.key?(:'last_updated_by') + self.last_updated_by = attributes[:'last_updated_by'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'require_approval') + self.require_approval = attributes[:'require_approval'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + + if attributes.key?(:'value_type') + self.value_type = attributes[:'value_type'] + end + + if attributes.key?(:'variants') + if (value = attributes[:'variants']).is_a?(Array) + self.variants = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @description.nil? + return false if @key.nil? + return false if @name.nil? + return false if @value_type.nil? + return false if @variants.nil? + true + end + + # Custom attribute writer method with validation + # @param description [Object] Object to be assigned + # @!visibility private + def description=(description) + if description.nil? + fail ArgumentError, 'invalid value for "description", description cannot be nil.' + end + @description = description + end + + # Custom attribute writer method with validation + # @param key [Object] Object to be assigned + # @!visibility private + def key=(key) + if key.nil? + fail ArgumentError, 'invalid value for "key", key cannot be nil.' + end + @key = key + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param value_type [Object] Object to be assigned + # @!visibility private + def value_type=(value_type) + if value_type.nil? + fail ArgumentError, 'invalid value for "value_type", value_type cannot be nil.' + end + @value_type = value_type + end + + # Custom attribute writer method with validation + # @param variants [Object] Object to be assigned + # @!visibility private + def variants=(variants) + if variants.nil? + fail ArgumentError, 'invalid value for "variants", variants cannot be nil.' + end + @variants = variants + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + archived_at == o.archived_at && + created_at == o.created_at && + created_by == o.created_by && + description == o.description && + distribution_channel == o.distribution_channel && + feature_flag_environments == o.feature_flag_environments && + json_schema == o.json_schema && + key == o.key && + last_updated_by == o.last_updated_by && + name == o.name && + require_approval == o.require_approval && + updated_at == o.updated_at && + value_type == o.value_type && + variants == o.variants && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [archived_at, created_at, created_by, description, distribution_channel, feature_flag_environments, json_schema, key, last_updated_by, name, require_approval, updated_at, value_type, variants, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/feature_flag_environment.rb b/lib/datadog_api_client/v2/models/feature_flag_environment.rb new file mode 100644 index 000000000000..4a005d1c7b93 --- /dev/null +++ b/lib/datadog_api_client/v2/models/feature_flag_environment.rb @@ -0,0 +1,282 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Environment-specific settings for a feature flag. + class FeatureFlagEnvironment + include BaseGenericModel + + # Allocation metadata for this environment. + attr_accessor :allocations + + # The allocation key used for the default variant. + attr_accessor :default_allocation_key + + # The ID of the default variant for this environment. + attr_accessor :default_variant_id + + # The ID of the environment. + attr_reader :environment_id + + # The name of the environment. + attr_accessor :environment_name + + # Indicates whether the environment is production. + attr_accessor :is_production + + # The allocation key used for the override variant. + attr_accessor :override_allocation_key + + # The ID of the override variant for this environment. + attr_accessor :override_variant_id + + # Pending suggestion identifier, if approval is required. + attr_accessor :pending_suggestion_id + + # Indicates whether feature flag changes require approval in this environment. + attr_accessor :require_feature_flag_approval + + # Rollout percentage for this environment. + attr_reader :rollout_percentage + + # Environment targeting rules for this feature flag. + attr_accessor :rules + + # The status of a feature flag in an environment. + attr_reader :status + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'allocations' => :'allocations', + :'default_allocation_key' => :'default_allocation_key', + :'default_variant_id' => :'default_variant_id', + :'environment_id' => :'environment_id', + :'environment_name' => :'environment_name', + :'is_production' => :'is_production', + :'override_allocation_key' => :'override_allocation_key', + :'override_variant_id' => :'override_variant_id', + :'pending_suggestion_id' => :'pending_suggestion_id', + :'require_feature_flag_approval' => :'require_feature_flag_approval', + :'rollout_percentage' => :'rollout_percentage', + :'rules' => :'rules', + :'status' => :'status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'allocations' => :'Hash', + :'default_allocation_key' => :'String', + :'default_variant_id' => :'String', + :'environment_id' => :'UUID', + :'environment_name' => :'String', + :'is_production' => :'Boolean', + :'override_allocation_key' => :'String', + :'override_variant_id' => :'String', + :'pending_suggestion_id' => :'String', + :'require_feature_flag_approval' => :'Boolean', + :'rollout_percentage' => :'Integer', + :'rules' => :'Array>', + :'status' => :'FeatureFlagStatus' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'allocations', + :'default_variant_id', + :'override_variant_id', + :'pending_suggestion_id', + ]) + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FeatureFlagEnvironment` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'allocations') + self.allocations = attributes[:'allocations'] + end + + if attributes.key?(:'default_allocation_key') + self.default_allocation_key = attributes[:'default_allocation_key'] + end + + if attributes.key?(:'default_variant_id') + self.default_variant_id = attributes[:'default_variant_id'] + end + + if attributes.key?(:'environment_id') + self.environment_id = attributes[:'environment_id'] + end + + if attributes.key?(:'environment_name') + self.environment_name = attributes[:'environment_name'] + end + + if attributes.key?(:'is_production') + self.is_production = attributes[:'is_production'] + end + + if attributes.key?(:'override_allocation_key') + self.override_allocation_key = attributes[:'override_allocation_key'] + end + + if attributes.key?(:'override_variant_id') + self.override_variant_id = attributes[:'override_variant_id'] + end + + if attributes.key?(:'pending_suggestion_id') + self.pending_suggestion_id = attributes[:'pending_suggestion_id'] + end + + if attributes.key?(:'require_feature_flag_approval') + self.require_feature_flag_approval = attributes[:'require_feature_flag_approval'] + end + + if attributes.key?(:'rollout_percentage') + self.rollout_percentage = attributes[:'rollout_percentage'] + end + + if attributes.key?(:'rules') + if (value = attributes[:'rules']).is_a?(Array) + self.rules = value + end + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @environment_id.nil? + return false if !@rollout_percentage.nil? && @rollout_percentage > 100 + return false if !@rollout_percentage.nil? && @rollout_percentage < 0 + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param environment_id [Object] Object to be assigned + # @!visibility private + def environment_id=(environment_id) + if environment_id.nil? + fail ArgumentError, 'invalid value for "environment_id", environment_id cannot be nil.' + end + @environment_id = environment_id + end + + # Custom attribute writer method with validation + # @param rollout_percentage [Object] Object to be assigned + # @!visibility private + def rollout_percentage=(rollout_percentage) + if !rollout_percentage.nil? && rollout_percentage > 100 + fail ArgumentError, 'invalid value for "rollout_percentage", must be smaller than or equal to 100.' + end + if !rollout_percentage.nil? && rollout_percentage < 0 + fail ArgumentError, 'invalid value for "rollout_percentage", must be greater than or equal to 0.' + end + @rollout_percentage = rollout_percentage + end + + # Custom attribute writer method with validation + # @param status [Object] Object to be assigned + # @!visibility private + def status=(status) + if status.nil? + fail ArgumentError, 'invalid value for "status", status cannot be nil.' + end + @status = status + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + allocations == o.allocations && + default_allocation_key == o.default_allocation_key && + default_variant_id == o.default_variant_id && + environment_id == o.environment_id && + environment_name == o.environment_name && + is_production == o.is_production && + override_allocation_key == o.override_allocation_key && + override_variant_id == o.override_variant_id && + pending_suggestion_id == o.pending_suggestion_id && + require_feature_flag_approval == o.require_feature_flag_approval && + rollout_percentage == o.rollout_percentage && + rules == o.rules && + status == o.status && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [allocations, default_allocation_key, default_variant_id, environment_id, environment_name, is_production, override_allocation_key, override_variant_id, pending_suggestion_id, require_feature_flag_approval, rollout_percentage, rules, status, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/feature_flag_response.rb b/lib/datadog_api_client/v2/models/feature_flag_response.rb new file mode 100644 index 000000000000..4b07ac36a077 --- /dev/null +++ b/lib/datadog_api_client/v2/models/feature_flag_response.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response containing a feature flag. + class FeatureFlagResponse + include BaseGenericModel + + # A feature flag resource. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'FeatureFlag' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FeatureFlagResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/feature_flag_status.rb b/lib/datadog_api_client/v2/models/feature_flag_status.rb new file mode 100644 index 000000000000..ba93e063091e --- /dev/null +++ b/lib/datadog_api_client/v2/models/feature_flag_status.rb @@ -0,0 +1,27 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The status of a feature flag in an environment. + class FeatureFlagStatus + include BaseEnumModel + + ENABLED = "ENABLED".freeze + DISABLED = "DISABLED".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/feature_flags_pagination_meta.rb b/lib/datadog_api_client/v2/models/feature_flags_pagination_meta.rb new file mode 100644 index 000000000000..d5c302736edf --- /dev/null +++ b/lib/datadog_api_client/v2/models/feature_flags_pagination_meta.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Pagination metadata for feature flags. + class FeatureFlagsPaginationMeta + include BaseGenericModel + + # + attr_accessor :page + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'page' => :'page' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'page' => :'FeatureFlagsPaginationMetaPage' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FeatureFlagsPaginationMeta` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'page') + self.page = attributes[:'page'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + page == o.page && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [page, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/feature_flags_pagination_meta_page.rb b/lib/datadog_api_client/v2/models/feature_flags_pagination_meta_page.rb new file mode 100644 index 000000000000..91dbe28e8b4e --- /dev/null +++ b/lib/datadog_api_client/v2/models/feature_flags_pagination_meta_page.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class FeatureFlagsPaginationMetaPage + include BaseGenericModel + + # Total number of items. + attr_accessor :total_count + + # Total number of items matching the filter. + attr_accessor :total_filtered_count + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'total_count' => :'total_count', + :'total_filtered_count' => :'total_filtered_count' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'total_count' => :'Integer', + :'total_filtered_count' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FeatureFlagsPaginationMetaPage` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'total_count') + self.total_count = attributes[:'total_count'] + end + + if attributes.key?(:'total_filtered_count') + self.total_filtered_count = attributes[:'total_filtered_count'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + total_count == o.total_count && + total_filtered_count == o.total_filtered_count && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [total_count, total_filtered_count, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/list_environments_response.rb b/lib/datadog_api_client/v2/models/list_environments_response.rb new file mode 100644 index 000000000000..841902bc72df --- /dev/null +++ b/lib/datadog_api_client/v2/models/list_environments_response.rb @@ -0,0 +1,135 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response containing a list of environments. + class ListEnvironmentsResponse + include BaseGenericModel + + # List of environments. + attr_reader :data + + # Pagination metadata for environments. + attr_accessor :meta + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data', + :'meta' => :'meta' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array', + :'meta' => :'EnvironmentsPaginationMeta' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ListEnvironmentsResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + meta == o.meta && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, meta, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/list_feature_flags_response.rb b/lib/datadog_api_client/v2/models/list_feature_flags_response.rb new file mode 100644 index 000000000000..eadbed473dbf --- /dev/null +++ b/lib/datadog_api_client/v2/models/list_feature_flags_response.rb @@ -0,0 +1,135 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response containing a list of feature flags. + class ListFeatureFlagsResponse + include BaseGenericModel + + # List of feature flags. + attr_reader :data + + # Pagination metadata for feature flags. + attr_accessor :meta + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data', + :'meta' => :'meta' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array', + :'meta' => :'FeatureFlagsPaginationMeta' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ListFeatureFlagsResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + meta == o.meta && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, meta, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/update_environment_attributes.rb b/lib/datadog_api_client/v2/models/update_environment_attributes.rb new file mode 100644 index 000000000000..59b852afa1ae --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_environment_attributes.rb @@ -0,0 +1,155 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes for updating an environment. + class UpdateEnvironmentAttributes + include BaseGenericModel + + # Indicates whether this is a production environment. + attr_accessor :is_production + + # The name of the environment. + attr_accessor :name + + # List of queries to define the environment scope. + attr_reader :queries + + # Indicates whether feature flag changes require approval in this environment. + attr_accessor :require_feature_flag_approval + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'is_production' => :'is_production', + :'name' => :'name', + :'queries' => :'queries', + :'require_feature_flag_approval' => :'require_feature_flag_approval' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'is_production' => :'Boolean', + :'name' => :'String', + :'queries' => :'Array', + :'require_feature_flag_approval' => :'Boolean' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UpdateEnvironmentAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'is_production') + self.is_production = attributes[:'is_production'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'queries') + if (value = attributes[:'queries']).is_a?(Array) + self.queries = value + end + end + + if attributes.key?(:'require_feature_flag_approval') + self.require_feature_flag_approval = attributes[:'require_feature_flag_approval'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if !@queries.nil? && @queries.length < 1 + true + end + + # Custom attribute writer method with validation + # @param queries [Object] Object to be assigned + # @!visibility private + def queries=(queries) + if !queries.nil? && queries.length < 1 + fail ArgumentError, 'invalid value for "queries", number of items must be greater than or equal to 1.' + end + @queries = queries + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + is_production == o.is_production && + name == o.name && + queries == o.queries && + require_feature_flag_approval == o.require_feature_flag_approval && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [is_production, name, queries, require_feature_flag_approval, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/update_environment_data.rb b/lib/datadog_api_client/v2/models/update_environment_data.rb new file mode 100644 index 000000000000..63797c821b60 --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_environment_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data for updating an environment. + class UpdateEnvironmentData + include BaseGenericModel + + # Attributes for updating an environment. + attr_reader :attributes + + # The resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'UpdateEnvironmentAttributes', + :'type' => :'UpdateEnvironmentDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UpdateEnvironmentData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/update_environment_data_type.rb b/lib/datadog_api_client/v2/models/update_environment_data_type.rb new file mode 100644 index 000000000000..f07b012490cd --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_environment_data_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The resource type. + class UpdateEnvironmentDataType + include BaseEnumModel + + ENVIRONMENTS = "environments".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/update_environment_request.rb b/lib/datadog_api_client/v2/models/update_environment_request.rb new file mode 100644 index 000000000000..613f22cddc7a --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_environment_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request to update an environment. + class UpdateEnvironmentRequest + include BaseGenericModel + + # Data for updating an environment. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'UpdateEnvironmentData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UpdateEnvironmentRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/update_feature_flag_attributes.rb b/lib/datadog_api_client/v2/models/update_feature_flag_attributes.rb new file mode 100644 index 000000000000..39bcc05f3f31 --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_feature_flag_attributes.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes for updating a feature flag. + class UpdateFeatureFlagAttributes + include BaseGenericModel + + # The description of the feature flag. + attr_accessor :description + + # JSON schema for validation when value_type is JSON. + attr_accessor :json_schema + + # The name of the feature flag. + attr_accessor :name + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'description' => :'description', + :'json_schema' => :'json_schema', + :'name' => :'name' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'description' => :'String', + :'json_schema' => :'String', + :'name' => :'String' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'json_schema', + ]) + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UpdateFeatureFlagAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'json_schema') + self.json_schema = attributes[:'json_schema'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + description == o.description && + json_schema == o.json_schema && + name == o.name && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [description, json_schema, name, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/update_feature_flag_data.rb b/lib/datadog_api_client/v2/models/update_feature_flag_data.rb new file mode 100644 index 000000000000..541e7823e6c1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_feature_flag_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data for updating a feature flag. + class UpdateFeatureFlagData + include BaseGenericModel + + # Attributes for updating a feature flag. + attr_reader :attributes + + # The resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'UpdateFeatureFlagAttributes', + :'type' => :'UpdateFeatureFlagDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UpdateFeatureFlagData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/update_feature_flag_data_type.rb b/lib/datadog_api_client/v2/models/update_feature_flag_data_type.rb new file mode 100644 index 000000000000..8ccb50cf1176 --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_feature_flag_data_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The resource type. + class UpdateFeatureFlagDataType + include BaseEnumModel + + FEATURE_FLAGS = "feature-flags".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/update_feature_flag_request.rb b/lib/datadog_api_client/v2/models/update_feature_flag_request.rb new file mode 100644 index 000000000000..ca5353f2ff22 --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_feature_flag_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request to update a feature flag. + class UpdateFeatureFlagRequest + include BaseGenericModel + + # Data for updating a feature flag. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'UpdateFeatureFlagData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UpdateFeatureFlagRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/value_type.rb b/lib/datadog_api_client/v2/models/value_type.rb new file mode 100644 index 000000000000..320a2b2d1c9c --- /dev/null +++ b/lib/datadog_api_client/v2/models/value_type.rb @@ -0,0 +1,30 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The type of values for the feature flag variants. + class ValueType + include BaseEnumModel + + BOOLEAN = "BOOLEAN".freeze + INTEGER = "INTEGER".freeze + NUMERIC = "NUMERIC".freeze + STRING = "STRING".freeze + JSON = "JSON".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/variant.rb b/lib/datadog_api_client/v2/models/variant.rb new file mode 100644 index 000000000000..65d9492684d2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/variant.rb @@ -0,0 +1,206 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A variant of a feature flag. + class Variant + include BaseGenericModel + + # The timestamp when the variant was created. + attr_accessor :created_at + + # The unique identifier of the variant. + attr_reader :id + + # The unique key of the variant. + attr_reader :key + + # The name of the variant. + attr_reader :name + + # The timestamp when the variant was last updated. + attr_accessor :updated_at + + # The value of the variant as a string. + attr_reader :value + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'created_at' => :'created_at', + :'id' => :'id', + :'key' => :'key', + :'name' => :'name', + :'updated_at' => :'updated_at', + :'value' => :'value' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'created_at' => :'Time', + :'id' => :'UUID', + :'key' => :'String', + :'name' => :'String', + :'updated_at' => :'Time', + :'value' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::Variant` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'key') + self.key = attributes[:'key'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @key.nil? + return false if @name.nil? + return false if @value.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param key [Object] Object to be assigned + # @!visibility private + def key=(key) + if key.nil? + fail ArgumentError, 'invalid value for "key", key cannot be nil.' + end + @key = key + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param value [Object] Object to be assigned + # @!visibility private + def value=(value) + if value.nil? + fail ArgumentError, 'invalid value for "value", value cannot be nil.' + end + @value = value + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + created_at == o.created_at && + id == o.id && + key == o.key && + name == o.name && + updated_at == o.updated_at && + value == o.value && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [created_at, id, key, name, updated_at, value, additional_properties].hash + end + end +end