diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index ad75118bfde..1d81e8b2f75 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -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 @@ -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. @@ -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. @@ -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 diff --git a/api/datadogV2/api_network_device_monitoring.go b/api/datadogV2/api_network_device_monitoring.go index bb303e234cb..113611354d3 100644 --- a/api/datadogV2/api_network_device_monitoring.go +++ b/api/datadogV2/api_network_device_monitoring.go @@ -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{}) } diff --git a/api/datadogV2/model_observability_pipeline_memory_buffer_options.go b/api/datadogV2/model_observability_pipeline_memory_buffer_options.go index 44470c4062d..0c29cdb37de 100644 --- a/api/datadogV2/model_observability_pipeline_memory_buffer_options.go +++ b/api/datadogV2/model_observability_pipeline_memory_buffer_options.go @@ -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:"-"` @@ -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 } @@ -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 } @@ -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{}{} @@ -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 @@ -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 } @@ -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 diff --git a/api/datadogV2/model_observability_pipeline_memory_buffer_size_options.go b/api/datadogV2/model_observability_pipeline_memory_buffer_size_options.go index 3d09f3d57c9..7de2b2e871c 100644 --- a/api/datadogV2/model_observability_pipeline_memory_buffer_size_options.go +++ b/api/datadogV2/model_observability_pipeline_memory_buffer_size_options.go @@ -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:"-"` @@ -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 } @@ -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 } @@ -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{}{} @@ -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 @@ -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 } @@ -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