diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 75755ab7e79f..590ba2170c55 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -62071,35 +62071,17 @@ components: type: object SecurityMonitoringRuleNewValueOptionsForgetAfter: description: The duration in days after which a learned value is forgotten. - enum: - - 1 - - 2 - - 7 - - 14 - - 21 - - 28 format: int32 + maximum: 30 + minimum: 1 type: integer - x-enum-varnames: - - ONE_DAY - - TWO_DAYS - - ONE_WEEK - - TWO_WEEKS - - THREE_WEEKS - - FOUR_WEEKS SecurityMonitoringRuleNewValueOptionsLearningDuration: default: 0 description: "The duration in days during which values are learned, and after which signals will be generated for values that\nweren't learned. If set to 0, a signal will be generated for all new values after the first value is learned." - enum: - - 0 - - 1 - - 7 format: int32 + maximum: 30 + minimum: 0 type: integer - x-enum-varnames: - - ZERO_DAYS - - ONE_DAY - - SEVEN_DAYS SecurityMonitoringRuleNewValueOptionsLearningMethod: default: duration description: The learning method used to determine when signals should be generated for values that weren't learned. diff --git a/packages/datadog-api-client-v2/index.ts b/packages/datadog-api-client-v2/index.ts index 9cf52a9f7f5b..b496efa9fb51 100644 --- a/packages/datadog-api-client-v2/index.ts +++ b/packages/datadog-api-client-v2/index.ts @@ -5297,8 +5297,6 @@ export { SecurityMonitoringRuleImpossibleTravelOptions } from "./models/Security export { SecurityMonitoringRuleKeepAlive } from "./models/SecurityMonitoringRuleKeepAlive"; export { SecurityMonitoringRuleMaxSignalDuration } from "./models/SecurityMonitoringRuleMaxSignalDuration"; export { SecurityMonitoringRuleNewValueOptions } from "./models/SecurityMonitoringRuleNewValueOptions"; -export { SecurityMonitoringRuleNewValueOptionsForgetAfter } from "./models/SecurityMonitoringRuleNewValueOptionsForgetAfter"; -export { SecurityMonitoringRuleNewValueOptionsLearningDuration } from "./models/SecurityMonitoringRuleNewValueOptionsLearningDuration"; export { SecurityMonitoringRuleNewValueOptionsLearningMethod } from "./models/SecurityMonitoringRuleNewValueOptionsLearningMethod"; export { SecurityMonitoringRuleNewValueOptionsLearningThreshold } from "./models/SecurityMonitoringRuleNewValueOptionsLearningThreshold"; export { SecurityMonitoringRuleOptions } from "./models/SecurityMonitoringRuleOptions"; diff --git a/packages/datadog-api-client-v2/models/ObjectSerializer.ts b/packages/datadog-api-client-v2/models/ObjectSerializer.ts index f07d1b4a2c6c..f81938f53b3c 100644 --- a/packages/datadog-api-client-v2/models/ObjectSerializer.ts +++ b/packages/datadog-api-client-v2/models/ObjectSerializer.ts @@ -5513,8 +5513,6 @@ const enumsMap: { [key: string]: any[] } = { SecurityMonitoringRuleMaxSignalDuration: [ 0, 60, 300, 600, 900, 1800, 3600, 7200, 10800, 21600, 43200, 86400, ], - SecurityMonitoringRuleNewValueOptionsForgetAfter: [1, 2, 7, 14, 21, 28], - SecurityMonitoringRuleNewValueOptionsLearningDuration: [0, 1, 7], SecurityMonitoringRuleNewValueOptionsLearningMethod: [ "duration", "threshold", diff --git a/packages/datadog-api-client-v2/models/SecurityMonitoringRuleNewValueOptions.ts b/packages/datadog-api-client-v2/models/SecurityMonitoringRuleNewValueOptions.ts index 05c24c29bc80..f241a9ec85ec 100644 --- a/packages/datadog-api-client-v2/models/SecurityMonitoringRuleNewValueOptions.ts +++ b/packages/datadog-api-client-v2/models/SecurityMonitoringRuleNewValueOptions.ts @@ -3,8 +3,6 @@ * This product includes software developed at Datadog (https://www.datadoghq.com/). * Copyright 2020-Present Datadog, Inc. */ -import { SecurityMonitoringRuleNewValueOptionsForgetAfter } from "./SecurityMonitoringRuleNewValueOptionsForgetAfter"; -import { SecurityMonitoringRuleNewValueOptionsLearningDuration } from "./SecurityMonitoringRuleNewValueOptionsLearningDuration"; import { SecurityMonitoringRuleNewValueOptionsLearningMethod } from "./SecurityMonitoringRuleNewValueOptionsLearningMethod"; import { SecurityMonitoringRuleNewValueOptionsLearningThreshold } from "./SecurityMonitoringRuleNewValueOptionsLearningThreshold"; @@ -17,7 +15,7 @@ export class SecurityMonitoringRuleNewValueOptions { /** * The duration in days after which a learned value is forgotten. */ - "forgetAfter"?: SecurityMonitoringRuleNewValueOptionsForgetAfter; + "forgetAfter"?: number; /** * When set to true, Datadog uses previous values that fall within the defined learning window to construct the baseline, enabling the system to establish an accurate baseline more rapidly rather than relying solely on gradual learning over time. */ @@ -26,7 +24,7 @@ export class SecurityMonitoringRuleNewValueOptions { * The duration in days during which values are learned, and after which signals will be generated for values that * weren't learned. If set to 0, a signal will be generated for all new values after the first value is learned. */ - "learningDuration"?: SecurityMonitoringRuleNewValueOptionsLearningDuration; + "learningDuration"?: number; /** * The learning method used to determine when signals should be generated for values that weren't learned. */ @@ -54,7 +52,7 @@ export class SecurityMonitoringRuleNewValueOptions { static readonly attributeTypeMap: AttributeTypeMap = { forgetAfter: { baseName: "forgetAfter", - type: "SecurityMonitoringRuleNewValueOptionsForgetAfter", + type: "number", }, instantaneousBaseline: { baseName: "instantaneousBaseline", @@ -62,7 +60,7 @@ export class SecurityMonitoringRuleNewValueOptions { }, learningDuration: { baseName: "learningDuration", - type: "SecurityMonitoringRuleNewValueOptionsLearningDuration", + type: "number", }, learningMethod: { baseName: "learningMethod", diff --git a/packages/datadog-api-client-v2/models/SecurityMonitoringRuleNewValueOptionsForgetAfter.ts b/packages/datadog-api-client-v2/models/SecurityMonitoringRuleNewValueOptionsForgetAfter.ts deleted file mode 100644 index 2fbfa1cad73a..000000000000 --- a/packages/datadog-api-client-v2/models/SecurityMonitoringRuleNewValueOptionsForgetAfter.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * 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. - */ - -import { UnparsedObject } from "../../datadog-api-client-common/util"; - -/** - * The duration in days after which a learned value is forgotten. - */ - -export type SecurityMonitoringRuleNewValueOptionsForgetAfter = - | typeof ONE_DAY - | typeof TWO_DAYS - | typeof ONE_WEEK - | typeof TWO_WEEKS - | typeof THREE_WEEKS - | typeof FOUR_WEEKS - | UnparsedObject; -export const ONE_DAY = 1; -export const TWO_DAYS = 2; -export const ONE_WEEK = 7; -export const TWO_WEEKS = 14; -export const THREE_WEEKS = 21; -export const FOUR_WEEKS = 28; diff --git a/packages/datadog-api-client-v2/models/SecurityMonitoringRuleNewValueOptionsLearningDuration.ts b/packages/datadog-api-client-v2/models/SecurityMonitoringRuleNewValueOptionsLearningDuration.ts deleted file mode 100644 index cd018c366263..000000000000 --- a/packages/datadog-api-client-v2/models/SecurityMonitoringRuleNewValueOptionsLearningDuration.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * 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. - */ - -import { UnparsedObject } from "../../datadog-api-client-common/util"; - -/** - * The duration in days during which values are learned, and after which signals will be generated for values that - * weren't learned. If set to 0, a signal will be generated for all new values after the first value is learned. - */ - -export type SecurityMonitoringRuleNewValueOptionsLearningDuration = - | typeof ZERO_DAYS - | typeof ONE_DAY - | typeof SEVEN_DAYS - | UnparsedObject; -export const ZERO_DAYS = 0; -export const ONE_DAY = 1; -export const SEVEN_DAYS = 7;