Skip to content

Commit a461545

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 (#3002)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 33e4283 commit a461545

File tree

4 files changed

+63
-3
lines changed

4 files changed

+63
-3
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.

lib/datadog_api_client/v2/models/observability_pipeline_disk_buffer_options.rb

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class ObservabilityPipelineDiskBufferOptions
2222
include BaseGenericModel
2323

2424
# Maximum size of the disk buffer.
25-
attr_accessor :max_size
25+
attr_reader :max_size
2626

2727
# The type of the buffer that will be configured, a disk buffer.
2828
attr_accessor :type
@@ -83,6 +83,24 @@ def initialize(attributes = {})
8383
end
8484
end
8585

86+
# Check to see if the all the properties in the model are valid
87+
# @return true if the model is valid
88+
# @!visibility private
89+
def valid?
90+
return false if @max_size.nil?
91+
true
92+
end
93+
94+
# Custom attribute writer method with validation
95+
# @param max_size [Object] Object to be assigned
96+
# @!visibility private
97+
def max_size=(max_size)
98+
if max_size.nil?
99+
fail ArgumentError, 'invalid value for "max_size", max_size cannot be nil.'
100+
end
101+
@max_size = max_size
102+
end
103+
86104
# Returns the object in the form of hash, with additionalProperties support.
87105
# @return [Hash] Returns the object in the form of hash
88106
# @!visibility private

lib/datadog_api_client/v2/models/observability_pipeline_memory_buffer_options.rb

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class ObservabilityPipelineMemoryBufferOptions
2222
include BaseGenericModel
2323

2424
# Maximum size of the memory buffer.
25-
attr_accessor :max_size
25+
attr_reader :max_size
2626

2727
# The type of the buffer that will be configured, a memory buffer.
2828
attr_accessor :type
@@ -83,6 +83,24 @@ def initialize(attributes = {})
8383
end
8484
end
8585

86+
# Check to see if the all the properties in the model are valid
87+
# @return true if the model is valid
88+
# @!visibility private
89+
def valid?
90+
return false if @max_size.nil?
91+
true
92+
end
93+
94+
# Custom attribute writer method with validation
95+
# @param max_size [Object] Object to be assigned
96+
# @!visibility private
97+
def max_size=(max_size)
98+
if max_size.nil?
99+
fail ArgumentError, 'invalid value for "max_size", max_size cannot be nil.'
100+
end
101+
@max_size = max_size
102+
end
103+
86104
# Returns the object in the form of hash, with additionalProperties support.
87105
# @return [Hash] Returns the object in the form of hash
88106
# @!visibility private

lib/datadog_api_client/v2/models/observability_pipeline_memory_buffer_size_options.rb

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class ObservabilityPipelineMemoryBufferSizeOptions
2222
include BaseGenericModel
2323

2424
# Maximum events for the memory buffer.
25-
attr_accessor :max_events
25+
attr_reader :max_events
2626

2727
# The type of the buffer that will be configured, a memory buffer.
2828
attr_accessor :type
@@ -83,6 +83,24 @@ def initialize(attributes = {})
8383
end
8484
end
8585

86+
# Check to see if the all the properties in the model are valid
87+
# @return true if the model is valid
88+
# @!visibility private
89+
def valid?
90+
return false if @max_events.nil?
91+
true
92+
end
93+
94+
# Custom attribute writer method with validation
95+
# @param max_events [Object] Object to be assigned
96+
# @!visibility private
97+
def max_events=(max_events)
98+
if max_events.nil?
99+
fail ArgumentError, 'invalid value for "max_events", max_events cannot be nil.'
100+
end
101+
@max_events = max_events
102+
end
103+
86104
# Returns the object in the form of hash, with additionalProperties support.
87105
# @return [Hash] Returns the object in the form of hash
88106
# @!visibility private

0 commit comments

Comments
 (0)