Skip to content

Commit 2639971

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Resolve issue where the go client cannot resolve between memoryBuffer and memoryBufferSize options (#3181)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent a588c7c commit 2639971

File tree

5 files changed

+20
-14
lines changed

5 files changed

+20
-14
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39639,6 +39639,8 @@ components:
3963939639
$ref: '#/components/schemas/ObservabilityPipelineBufferOptionsDiskType'
3964039640
when_full:
3964139641
$ref: '#/components/schemas/ObservabilityPipelineBufferOptionsWhenFull'
39642+
required:
39643+
- max_size
3964239644
type: object
3964339645
ObservabilityPipelineElasticsearchDestination:
3964439646
description: 'The `elasticsearch` destination writes logs to an Elasticsearch
@@ -40892,6 +40894,8 @@ components:
4089240894
$ref: '#/components/schemas/ObservabilityPipelineBufferOptionsMemoryType'
4089340895
when_full:
4089440896
$ref: '#/components/schemas/ObservabilityPipelineBufferOptionsWhenFull'
40897+
required:
40898+
- max_size
4089540899
type: object
4089640900
ObservabilityPipelineMemoryBufferSizeOptions:
4089740901
description: Options for configuring a memory buffer by queue length.
@@ -40905,6 +40909,8 @@ components:
4090540909
$ref: '#/components/schemas/ObservabilityPipelineBufferOptionsMemoryType'
4090640910
when_full:
4090740911
$ref: '#/components/schemas/ObservabilityPipelineBufferOptionsWhenFull'
40912+
required:
40913+
- max_events
4090840914
type: object
4090940915
ObservabilityPipelineMetadataEntry:
4091040916
description: A custom metadata entry.

src/datadog_api_client/v2/model/observability_pipeline_buffer_options.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def __init__(self, **kwargs):
1616
Configuration for buffer settings on destination components.
1717
1818
:param max_size: Maximum size of the disk buffer.
19-
:type max_size: int, optional
19+
:type max_size: int
2020
2121
:param type: The type of the buffer that will be configured, a disk buffer.
2222
:type type: ObservabilityPipelineBufferOptionsDiskType, optional
@@ -25,7 +25,7 @@ def __init__(self, **kwargs):
2525
:type when_full: ObservabilityPipelineBufferOptionsWhenFull, optional
2626
2727
:param max_events: Maximum events for the memory buffer.
28-
:type max_events: int, optional
28+
:type max_events: int
2929
"""
3030
super().__init__(kwargs)
3131

src/datadog_api_client/v2/model/observability_pipeline_disk_buffer_options.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def openapi_types(_):
4646

4747
def __init__(
4848
self_,
49-
max_size: Union[int, UnsetType] = unset,
49+
max_size: int,
5050
type: Union[ObservabilityPipelineBufferOptionsDiskType, UnsetType] = unset,
5151
when_full: Union[ObservabilityPipelineBufferOptionsWhenFull, UnsetType] = unset,
5252
**kwargs,
@@ -55,18 +55,18 @@ def __init__(
5555
Options for configuring a disk buffer.
5656
5757
:param max_size: Maximum size of the disk buffer.
58-
:type max_size: int, optional
58+
:type max_size: int
5959
6060
:param type: The type of the buffer that will be configured, a disk buffer.
6161
:type type: ObservabilityPipelineBufferOptionsDiskType, optional
6262
6363
:param when_full: Behavior when the buffer is full (block and stop accepting new events, or drop new events)
6464
:type when_full: ObservabilityPipelineBufferOptionsWhenFull, optional
6565
"""
66-
if max_size is not unset:
67-
kwargs["max_size"] = max_size
6866
if type is not unset:
6967
kwargs["type"] = type
7068
if when_full is not unset:
7169
kwargs["when_full"] = when_full
7270
super().__init__(kwargs)
71+
72+
self_.max_size = max_size

src/datadog_api_client/v2/model/observability_pipeline_memory_buffer_options.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def openapi_types(_):
4646

4747
def __init__(
4848
self_,
49-
max_size: Union[int, UnsetType] = unset,
49+
max_size: int,
5050
type: Union[ObservabilityPipelineBufferOptionsMemoryType, UnsetType] = unset,
5151
when_full: Union[ObservabilityPipelineBufferOptionsWhenFull, UnsetType] = unset,
5252
**kwargs,
@@ -55,18 +55,18 @@ def __init__(
5555
Options for configuring a memory buffer by byte size.
5656
5757
:param max_size: Maximum size of the memory buffer.
58-
:type max_size: int, optional
58+
:type max_size: int
5959
6060
:param type: The type of the buffer that will be configured, a memory buffer.
6161
:type type: ObservabilityPipelineBufferOptionsMemoryType, optional
6262
6363
:param when_full: Behavior when the buffer is full (block and stop accepting new events, or drop new events)
6464
:type when_full: ObservabilityPipelineBufferOptionsWhenFull, optional
6565
"""
66-
if max_size is not unset:
67-
kwargs["max_size"] = max_size
6866
if type is not unset:
6967
kwargs["type"] = type
7068
if when_full is not unset:
7169
kwargs["when_full"] = when_full
7270
super().__init__(kwargs)
71+
72+
self_.max_size = max_size

src/datadog_api_client/v2/model/observability_pipeline_memory_buffer_size_options.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def openapi_types(_):
4646

4747
def __init__(
4848
self_,
49-
max_events: Union[int, UnsetType] = unset,
49+
max_events: int,
5050
type: Union[ObservabilityPipelineBufferOptionsMemoryType, UnsetType] = unset,
5151
when_full: Union[ObservabilityPipelineBufferOptionsWhenFull, UnsetType] = unset,
5252
**kwargs,
@@ -55,18 +55,18 @@ def __init__(
5555
Options for configuring a memory buffer by queue length.
5656
5757
:param max_events: Maximum events for the memory buffer.
58-
:type max_events: int, optional
58+
:type max_events: int
5959
6060
:param type: The type of the buffer that will be configured, a memory buffer.
6161
:type type: ObservabilityPipelineBufferOptionsMemoryType, optional
6262
6363
:param when_full: Behavior when the buffer is full (block and stop accepting new events, or drop new events)
6464
:type when_full: ObservabilityPipelineBufferOptionsWhenFull, optional
6565
"""
66-
if max_events is not unset:
67-
kwargs["max_events"] = max_events
6866
if type is not unset:
6967
kwargs["type"] = type
7068
if when_full is not unset:
7169
kwargs["when_full"] = when_full
7270
super().__init__(kwargs)
71+
72+
self_.max_events = max_events

0 commit comments

Comments
 (0)