Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 29 additions & 3 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,27 @@ components:
required: false
schema:
type: string
NDMPageNumber:
description: Specific page number to return. Defaults to 0.
in: query
name: page[number]
required: false
schema:
default: 0
example: 0
format: int64
type: integer
NDMPageSize:
description: Size for a given page. The maximum allowed value is 500. Defaults
to 50.
in: query
name: page[size]
required: false
schema:
default: 50
example: 50
format: int64
type: integer
NotificationRuleIDPathParameter:
description: Notification Rule UUID
example: e555e290-ed65-49bd-ae18-8acbfcf18db7
Expand Down Expand Up @@ -40848,6 +40869,8 @@ components:
type: integer
type:
$ref: '#/components/schemas/ObservabilityPipelineBufferOptionsMemoryType'
when_full:
$ref: '#/components/schemas/ObservabilityPipelineBufferOptionsWhenFull'
type: object
ObservabilityPipelineMemoryBufferSizeOptions:
description: Options for configuring a memory buffer by queue length.
Expand All @@ -40859,6 +40882,8 @@ components:
type: integer
type:
$ref: '#/components/schemas/ObservabilityPipelineBufferOptionsMemoryType'
when_full:
$ref: '#/components/schemas/ObservabilityPipelineBufferOptionsWhenFull'
type: object
ObservabilityPipelineMetadataEntry:
description: A custom metadata entry.
Expand Down Expand Up @@ -86135,14 +86160,15 @@ paths:
description: Get the list of devices.
operationId: ListDevices
parameters:
- $ref: '#/components/parameters/PageSize'
- $ref: '#/components/parameters/PageNumber'
- description: The field to sort the devices by.
- $ref: '#/components/parameters/NDMPageSize'
- $ref: '#/components/parameters/NDMPageNumber'
- description: The field to sort the devices by. Defaults to `name`.
example: status
in: query
name: sort
required: false
schema:
default: name
type: string
- description: Filter devices by tag.
example: status:ok
Expand Down
2 changes: 1 addition & 1 deletion api/datadogV2/api_network_device_monitoring.go
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ func (a *NetworkDeviceMonitoringApi) ListDevices(ctx _context.Context, o ...List
// ListDevicesWithPagination provides a paginated version of ListDevices returning a channel with all items.
func (a *NetworkDeviceMonitoringApi) ListDevicesWithPagination(ctx _context.Context, o ...ListDevicesOptionalParameters) (<-chan datadog.PaginationResult[DevicesListData], func()) {
ctx, cancel := _context.WithCancel(ctx)
pageSize_ := int64(10)
pageSize_ := int64(50)
if len(o) == 0 {
o = append(o, ListDevicesOptionalParameters{})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ type ObservabilityPipelineMemoryBufferOptions struct {
MaxSize *int64 `json:"max_size,omitempty"`
// The type of the buffer that will be configured, a memory buffer.
Type *ObservabilityPipelineBufferOptionsMemoryType `json:"type,omitempty"`
// Behavior when the buffer is full (block and stop accepting new events, or drop new events)
WhenFull *ObservabilityPipelineBufferOptionsWhenFull `json:"when_full,omitempty"`
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
UnparsedObject map[string]interface{} `json:"-"`
AdditionalProperties map[string]interface{} `json:"-"`
Expand All @@ -27,6 +29,8 @@ func NewObservabilityPipelineMemoryBufferOptions() *ObservabilityPipelineMemoryB
this := ObservabilityPipelineMemoryBufferOptions{}
var typeVar ObservabilityPipelineBufferOptionsMemoryType = OBSERVABILITYPIPELINEBUFFEROPTIONSMEMORYTYPE_MEMORY
this.Type = &typeVar
var whenFull ObservabilityPipelineBufferOptionsWhenFull = OBSERVABILITYPIPELINEBUFFEROPTIONSWHENFULL_BLOCK
this.WhenFull = &whenFull
return &this
}

Expand All @@ -37,6 +41,8 @@ func NewObservabilityPipelineMemoryBufferOptionsWithDefaults() *ObservabilityPip
this := ObservabilityPipelineMemoryBufferOptions{}
var typeVar ObservabilityPipelineBufferOptionsMemoryType = OBSERVABILITYPIPELINEBUFFEROPTIONSMEMORYTYPE_MEMORY
this.Type = &typeVar
var whenFull ObservabilityPipelineBufferOptionsWhenFull = OBSERVABILITYPIPELINEBUFFEROPTIONSWHENFULL_BLOCK
this.WhenFull = &whenFull
return &this
}

Expand Down Expand Up @@ -96,6 +102,34 @@ func (o *ObservabilityPipelineMemoryBufferOptions) SetType(v ObservabilityPipeli
o.Type = &v
}

// GetWhenFull returns the WhenFull field value if set, zero value otherwise.
func (o *ObservabilityPipelineMemoryBufferOptions) GetWhenFull() ObservabilityPipelineBufferOptionsWhenFull {
if o == nil || o.WhenFull == nil {
var ret ObservabilityPipelineBufferOptionsWhenFull
return ret
}
return *o.WhenFull
}

// GetWhenFullOk returns a tuple with the WhenFull field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ObservabilityPipelineMemoryBufferOptions) GetWhenFullOk() (*ObservabilityPipelineBufferOptionsWhenFull, bool) {
if o == nil || o.WhenFull == nil {
return nil, false
}
return o.WhenFull, true
}

// HasWhenFull returns a boolean if a field has been set.
func (o *ObservabilityPipelineMemoryBufferOptions) HasWhenFull() bool {
return o != nil && o.WhenFull != nil
}

// SetWhenFull gets a reference to the given ObservabilityPipelineBufferOptionsWhenFull and assigns it to the WhenFull field.
func (o *ObservabilityPipelineMemoryBufferOptions) SetWhenFull(v ObservabilityPipelineBufferOptionsWhenFull) {
o.WhenFull = &v
}

// MarshalJSON serializes the struct using spec logic.
func (o ObservabilityPipelineMemoryBufferOptions) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
Expand All @@ -108,6 +142,9 @@ func (o ObservabilityPipelineMemoryBufferOptions) MarshalJSON() ([]byte, error)
if o.Type != nil {
toSerialize["type"] = o.Type
}
if o.WhenFull != nil {
toSerialize["when_full"] = o.WhenFull
}

for key, value := range o.AdditionalProperties {
toSerialize[key] = value
Expand All @@ -118,15 +155,16 @@ func (o ObservabilityPipelineMemoryBufferOptions) MarshalJSON() ([]byte, error)
// UnmarshalJSON deserializes the given payload.
func (o *ObservabilityPipelineMemoryBufferOptions) UnmarshalJSON(bytes []byte) (err error) {
all := struct {
MaxSize *int64 `json:"max_size,omitempty"`
Type *ObservabilityPipelineBufferOptionsMemoryType `json:"type,omitempty"`
MaxSize *int64 `json:"max_size,omitempty"`
Type *ObservabilityPipelineBufferOptionsMemoryType `json:"type,omitempty"`
WhenFull *ObservabilityPipelineBufferOptionsWhenFull `json:"when_full,omitempty"`
}{}
if err = datadog.Unmarshal(bytes, &all); err != nil {
return datadog.Unmarshal(bytes, &o.UnparsedObject)
}
additionalProperties := make(map[string]interface{})
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
datadog.DeleteKeys(additionalProperties, &[]string{"max_size", "type"})
datadog.DeleteKeys(additionalProperties, &[]string{"max_size", "type", "when_full"})
} else {
return err
}
Expand All @@ -138,6 +176,11 @@ func (o *ObservabilityPipelineMemoryBufferOptions) UnmarshalJSON(bytes []byte) (
} else {
o.Type = all.Type
}
if all.WhenFull != nil && !all.WhenFull.IsValid() {
hasInvalidField = true
} else {
o.WhenFull = all.WhenFull
}

if len(additionalProperties) > 0 {
o.AdditionalProperties = additionalProperties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ type ObservabilityPipelineMemoryBufferSizeOptions struct {
MaxEvents *int64 `json:"max_events,omitempty"`
// The type of the buffer that will be configured, a memory buffer.
Type *ObservabilityPipelineBufferOptionsMemoryType `json:"type,omitempty"`
// Behavior when the buffer is full (block and stop accepting new events, or drop new events)
WhenFull *ObservabilityPipelineBufferOptionsWhenFull `json:"when_full,omitempty"`
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
UnparsedObject map[string]interface{} `json:"-"`
AdditionalProperties map[string]interface{} `json:"-"`
Expand All @@ -27,6 +29,8 @@ func NewObservabilityPipelineMemoryBufferSizeOptions() *ObservabilityPipelineMem
this := ObservabilityPipelineMemoryBufferSizeOptions{}
var typeVar ObservabilityPipelineBufferOptionsMemoryType = OBSERVABILITYPIPELINEBUFFEROPTIONSMEMORYTYPE_MEMORY
this.Type = &typeVar
var whenFull ObservabilityPipelineBufferOptionsWhenFull = OBSERVABILITYPIPELINEBUFFEROPTIONSWHENFULL_BLOCK
this.WhenFull = &whenFull
return &this
}

Expand All @@ -37,6 +41,8 @@ func NewObservabilityPipelineMemoryBufferSizeOptionsWithDefaults() *Observabilit
this := ObservabilityPipelineMemoryBufferSizeOptions{}
var typeVar ObservabilityPipelineBufferOptionsMemoryType = OBSERVABILITYPIPELINEBUFFEROPTIONSMEMORYTYPE_MEMORY
this.Type = &typeVar
var whenFull ObservabilityPipelineBufferOptionsWhenFull = OBSERVABILITYPIPELINEBUFFEROPTIONSWHENFULL_BLOCK
this.WhenFull = &whenFull
return &this
}

Expand Down Expand Up @@ -96,6 +102,34 @@ func (o *ObservabilityPipelineMemoryBufferSizeOptions) SetType(v ObservabilityPi
o.Type = &v
}

// GetWhenFull returns the WhenFull field value if set, zero value otherwise.
func (o *ObservabilityPipelineMemoryBufferSizeOptions) GetWhenFull() ObservabilityPipelineBufferOptionsWhenFull {
if o == nil || o.WhenFull == nil {
var ret ObservabilityPipelineBufferOptionsWhenFull
return ret
}
return *o.WhenFull
}

// GetWhenFullOk returns a tuple with the WhenFull field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ObservabilityPipelineMemoryBufferSizeOptions) GetWhenFullOk() (*ObservabilityPipelineBufferOptionsWhenFull, bool) {
if o == nil || o.WhenFull == nil {
return nil, false
}
return o.WhenFull, true
}

// HasWhenFull returns a boolean if a field has been set.
func (o *ObservabilityPipelineMemoryBufferSizeOptions) HasWhenFull() bool {
return o != nil && o.WhenFull != nil
}

// SetWhenFull gets a reference to the given ObservabilityPipelineBufferOptionsWhenFull and assigns it to the WhenFull field.
func (o *ObservabilityPipelineMemoryBufferSizeOptions) SetWhenFull(v ObservabilityPipelineBufferOptionsWhenFull) {
o.WhenFull = &v
}

// MarshalJSON serializes the struct using spec logic.
func (o ObservabilityPipelineMemoryBufferSizeOptions) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
Expand All @@ -108,6 +142,9 @@ func (o ObservabilityPipelineMemoryBufferSizeOptions) MarshalJSON() ([]byte, err
if o.Type != nil {
toSerialize["type"] = o.Type
}
if o.WhenFull != nil {
toSerialize["when_full"] = o.WhenFull
}

for key, value := range o.AdditionalProperties {
toSerialize[key] = value
Expand All @@ -120,13 +157,14 @@ func (o *ObservabilityPipelineMemoryBufferSizeOptions) UnmarshalJSON(bytes []byt
all := struct {
MaxEvents *int64 `json:"max_events,omitempty"`
Type *ObservabilityPipelineBufferOptionsMemoryType `json:"type,omitempty"`
WhenFull *ObservabilityPipelineBufferOptionsWhenFull `json:"when_full,omitempty"`
}{}
if err = datadog.Unmarshal(bytes, &all); err != nil {
return datadog.Unmarshal(bytes, &o.UnparsedObject)
}
additionalProperties := make(map[string]interface{})
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
datadog.DeleteKeys(additionalProperties, &[]string{"max_events", "type"})
datadog.DeleteKeys(additionalProperties, &[]string{"max_events", "type", "when_full"})
} else {
return err
}
Expand All @@ -138,6 +176,11 @@ func (o *ObservabilityPipelineMemoryBufferSizeOptions) UnmarshalJSON(bytes []byt
} else {
o.Type = all.Type
}
if all.WhenFull != nil && !all.WhenFull.IsValid() {
hasInvalidField = true
} else {
o.WhenFull = all.WhenFull
}

if len(additionalProperties) > 0 {
o.AdditionalProperties = additionalProperties
Expand Down
Loading