diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 692f131b29..06336cb605 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -88372,33 +88372,20 @@ ] }, "downsampling": { - "description": "The downsampling configuration to execute for the managed backing index after rollover.", - "allOf": [ - { - "$ref": "#/components/schemas/indices._types.DataStreamLifecycleDownsampling" - } - ] - }, - "enabled": { - "description": "If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle\nthat's disabled (enabled: `false`) will have no effect on the data stream.", - "default": true, - "type": "boolean" - } - } - }, - "indices._types.DataStreamLifecycleDownsampling": { - "type": "object", - "properties": { - "rounds": { "description": "The list of downsampling rounds to execute as part of this downsampling configuration", "type": "array", "items": { "$ref": "#/components/schemas/indices._types.DownsamplingRound" } + }, + "enabled": { + "description": "If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle\nthat's disabled (enabled: `false`) will have no effect on the data stream.", + "default": true, + "type": "boolean" } }, "required": [ - "rounds" + "downsampling" ] }, "indices._types.DownsamplingRound": { diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index d921f60720..fca036fb72 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -60723,33 +60723,20 @@ ] }, "downsampling": { - "description": "The downsampling configuration to execute for the managed backing index after rollover.", - "allOf": [ - { - "$ref": "#/components/schemas/indices._types.DataStreamLifecycleDownsampling" - } - ] - }, - "enabled": { - "description": "If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle\nthat's disabled (enabled: `false`) will have no effect on the data stream.", - "default": true, - "type": "boolean" - } - } - }, - "indices._types.DataStreamLifecycleDownsampling": { - "type": "object", - "properties": { - "rounds": { "description": "The list of downsampling rounds to execute as part of this downsampling configuration", "type": "array", "items": { "$ref": "#/components/schemas/indices._types.DownsamplingRound" } + }, + "enabled": { + "description": "If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle\nthat's disabled (enabled: `false`) will have no effect on the data stream.", + "default": true, + "type": "boolean" } }, "required": [ - "rounds" + "downsampling" ] }, "indices._types.DownsamplingRound": { diff --git a/output/schema/schema.json b/output/schema/schema.json index 923aee4294..2d4af13d0c 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -149241,14 +149241,17 @@ } }, { - "description": "The downsampling configuration to execute for the managed backing index after rollover.", + "description": "The list of downsampling rounds to execute as part of this downsampling configuration", "name": "downsampling", - "required": false, + "required": true, "type": { - "kind": "instance_of", - "type": { - "name": "DataStreamLifecycleDownsampling", - "namespace": "indices._types" + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "DownsamplingRound", + "namespace": "indices._types" + } } } }, @@ -149268,31 +149271,6 @@ ], "specLocation": "indices/_types/DataStreamLifecycle.ts#L25-L45" }, - { - "kind": "interface", - "name": { - "name": "DataStreamLifecycleDownsampling", - "namespace": "indices._types" - }, - "properties": [ - { - "description": "The list of downsampling rounds to execute as part of this downsampling configuration", - "name": "rounds", - "required": true, - "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "DownsamplingRound", - "namespace": "indices._types" - } - } - } - } - ], - "specLocation": "indices/_types/DataStreamLifecycleDownsampling.ts#L22-L27" - }, { "kind": "interface", "name": { diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 8c95fa5b9e..f24a80b56e 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -11882,14 +11882,10 @@ export interface IndicesDataStreamIndex { export interface IndicesDataStreamLifecycle { data_retention?: Duration - downsampling?: IndicesDataStreamLifecycleDownsampling + downsampling: IndicesDownsamplingRound[] enabled?: boolean } -export interface IndicesDataStreamLifecycleDownsampling { - rounds: IndicesDownsamplingRound[] -} - export interface IndicesDataStreamLifecycleRolloverConditions { min_age?: Duration max_age?: string diff --git a/specification/indices/_types/DataStreamLifecycle.ts b/specification/indices/_types/DataStreamLifecycle.ts index a9af498a1d..938db41460 100644 --- a/specification/indices/_types/DataStreamLifecycle.ts +++ b/specification/indices/_types/DataStreamLifecycle.ts @@ -20,7 +20,7 @@ import { ByteSize } from '@_types/common' import { long } from '@_types/Numeric' import { Duration } from '@_types/Time' -import { DataStreamLifecycleDownsampling } from '@indices/_types/DataStreamLifecycleDownsampling' +import { DownsamplingRound } from '@indices/_types/DownsamplingRound' /** * Data stream lifecycle denotes that a data stream is managed by the data stream lifecycle and contains the configuration. @@ -33,9 +33,9 @@ export class DataStreamLifecycle { */ data_retention?: Duration /** - * The downsampling configuration to execute for the managed backing index after rollover. + * The list of downsampling rounds to execute as part of this downsampling configuration */ - downsampling?: DataStreamLifecycleDownsampling + downsampling: DownsamplingRound[] /** * If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle * that's disabled (enabled: `false`) will have no effect on the data stream. diff --git a/specification/indices/_types/DataStreamLifecycleDownsampling.ts b/specification/indices/_types/DataStreamLifecycleDownsampling.ts deleted file mode 100644 index 4aad62df47..0000000000 --- a/specification/indices/_types/DataStreamLifecycleDownsampling.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { DownsamplingRound } from '@indices/_types/DownsamplingRound' - -export class DataStreamLifecycleDownsampling { - /** - * The list of downsampling rounds to execute as part of this downsampling configuration - */ - rounds: DownsamplingRound[] -}