Skip to content
Open
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
38 changes: 34 additions & 4 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2962,10 +2962,7 @@ components:
data_source:
$ref: '#/components/schemas/FormulaAndFunctionEventsDataSource'
group_by:
description: Group by options.
items:
$ref: '#/components/schemas/FormulaAndFunctionEventQueryGroupBy'
type: array
$ref: '#/components/schemas/FormulaAndFunctionEventQueryGroupByConfig'
indexes:
description: An array of index names to query in the stream. Omit or use
`[]` to query all indexes at once.
Expand Down Expand Up @@ -3037,6 +3034,39 @@ components:
required:
- facet
type: object
FormulaAndFunctionEventQueryGroupByConfig:
description: Group by configuration for a formula and functions events query.
Can be a list of facet objects or a flat object with a list of fields.
oneOf:
- $ref: '#/components/schemas/FormulaAndFunctionEventQueryGroupByList'
- $ref: '#/components/schemas/FormulaAndFunctionEventQueryGroupByFields'
FormulaAndFunctionEventQueryGroupByFields:
description: Flat group by using multiple event facets.
properties:
fields:
description: List of event facets to group by.
example:
- hostname
- service
items:
description: Event facet.
type: string
type: array
limit:
description: Number of groups to return.
example: 10
format: int64
type: integer
sort:
$ref: '#/components/schemas/FormulaAndFunctionEventQueryGroupBySort'
required:
- fields
type: object
FormulaAndFunctionEventQueryGroupByList:
description: List of objects used to group by.
items:
$ref: '#/components/schemas/FormulaAndFunctionEventQueryGroupBy'
type: array
FormulaAndFunctionEventQueryGroupBySort:
description: Options for sorting group by results.
properties:
Expand Down
97 changes: 97 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32179,6 +32179,53 @@ components:
type: string
type: array
type: object
Integration:
description: Integration resource object.
properties:
attributes:
$ref: '#/components/schemas/IntegrationAttributes'
id:
description: The unique identifier of the integration.
example: calico
type: string
links:
$ref: '#/components/schemas/IntegrationLinks'
type:
$ref: '#/components/schemas/IntegrationType'
required:
- type
- id
- attributes
type: object
IntegrationAttributes:
description: Attributes for an integration.
properties:
categories:
description: List of categories associated with the integration.
example:
- Category::Kubernetes
- Category::Log Collection
items:
type: string
type: array
description:
description: A description of the integration.
example: Calico is a networking and network security solution for containers.
type: string
installed:
description: Whether the integration is installed.
example: true
type: boolean
title:
description: The name of the integration.
example: calico
type: string
required:
- title
- description
- categories
- installed
type: object
IntegrationIncident:
description: Incident integration settings
properties:
Expand Down Expand Up @@ -32284,6 +32331,14 @@ components:
value:
$ref: '#/components/schemas/AnyValue'
type: object
IntegrationLinks:
description: Links for the integration resource.
properties:
self:
description: Link to the integration resource.
example: /integrations?integrationId=calico
type: string
type: object
IntegrationMonitor:
description: Monitor integration settings
properties:
Expand Down Expand Up @@ -32385,6 +32440,15 @@ components:
type: string
type: object
type: object
IntegrationType:
default: integration
description: Integration resource type.
enum:
- integration
example: integration
type: string
x-enum-varnames:
- INTEGRATION
InterfaceAttributes:
description: The interface attributes
properties:
Expand Down Expand Up @@ -34776,6 +34840,17 @@ components:
- data
- meta
type: object
ListIntegrationsResponse:
description: Response containing information about multiple integrations.
properties:
data:
description: Array of integration objects.
items:
$ref: '#/components/schemas/Integration'
type: array
required:
- data
type: object
ListInterfaceTagsResponse:
description: Response for listing interface tags.
properties:
Expand Down Expand Up @@ -84205,6 +84280,24 @@ paths:
x-unstable: '**Note**: This endpoint is in public beta and is subject to change.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/integrations:
get:
operationId: ListIntegrations
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ListIntegrationsResponse'
description: Successful Response.
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
security:
- apiKeyAuth: []
appKeyAuth: []
summary: List Integrations
tags:
- Integrations
/api/v2/integrations/cloudflare/accounts:
get:
description: List Cloudflare accounts.
Expand Down Expand Up @@ -106291,6 +106384,10 @@ tags:
and todos. See the [Incident Management page](https://docs.datadoghq.com/service_management/incident_management/)
for more information.
name: Incidents
- description: 'The Integrations API is used to list available integrations

and retrieve information about their installation status.'
name: Integrations
- description: Manage your Jira Integration. Atlassian Jira is a project management
and issue tracking tool for teams to coordinate work and handle tasks efficiently.
name: Jira Integration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ type FormulaAndFunctionEventQueryDefinition struct {
CrossOrgUuids []string `json:"cross_org_uuids,omitempty"`
// Data source for event platform-based queries.
DataSource FormulaAndFunctionEventsDataSource `json:"data_source"`
// Group by options.
GroupBy []FormulaAndFunctionEventQueryGroupBy `json:"group_by,omitempty"`
// Group by configuration for a formula and functions events query. Can be a list of facet objects or a flat object with a list of fields.
GroupBy *FormulaAndFunctionEventQueryGroupByConfig `json:"group_by,omitempty"`
// An array of index names to query in the stream. Omit or use `[]` to query all indexes at once.
Indexes []string `json:"indexes,omitempty"`
// Name of the query for use in formulas.
Expand Down Expand Up @@ -128,31 +128,31 @@ func (o *FormulaAndFunctionEventQueryDefinition) SetDataSource(v FormulaAndFunct
}

// GetGroupBy returns the GroupBy field value if set, zero value otherwise.
func (o *FormulaAndFunctionEventQueryDefinition) GetGroupBy() []FormulaAndFunctionEventQueryGroupBy {
func (o *FormulaAndFunctionEventQueryDefinition) GetGroupBy() FormulaAndFunctionEventQueryGroupByConfig {
if o == nil || o.GroupBy == nil {
var ret []FormulaAndFunctionEventQueryGroupBy
var ret FormulaAndFunctionEventQueryGroupByConfig
return ret
}
return o.GroupBy
return *o.GroupBy
}

// GetGroupByOk returns a tuple with the GroupBy field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FormulaAndFunctionEventQueryDefinition) GetGroupByOk() (*[]FormulaAndFunctionEventQueryGroupBy, bool) {
func (o *FormulaAndFunctionEventQueryDefinition) GetGroupByOk() (*FormulaAndFunctionEventQueryGroupByConfig, bool) {
if o == nil || o.GroupBy == nil {
return nil, false
}
return &o.GroupBy, true
return o.GroupBy, true
}

// HasGroupBy returns a boolean if a field has been set.
func (o *FormulaAndFunctionEventQueryDefinition) HasGroupBy() bool {
return o != nil && o.GroupBy != nil
}

// SetGroupBy gets a reference to the given []FormulaAndFunctionEventQueryGroupBy and assigns it to the GroupBy field.
func (o *FormulaAndFunctionEventQueryDefinition) SetGroupBy(v []FormulaAndFunctionEventQueryGroupBy) {
o.GroupBy = v
// SetGroupBy gets a reference to the given FormulaAndFunctionEventQueryGroupByConfig and assigns it to the GroupBy field.
func (o *FormulaAndFunctionEventQueryDefinition) SetGroupBy(v FormulaAndFunctionEventQueryGroupByConfig) {
o.GroupBy = &v
}

// GetIndexes returns the Indexes field value if set, zero value otherwise.
Expand Down Expand Up @@ -299,7 +299,7 @@ func (o *FormulaAndFunctionEventQueryDefinition) UnmarshalJSON(bytes []byte) (er
Compute *FormulaAndFunctionEventQueryDefinitionCompute `json:"compute"`
CrossOrgUuids []string `json:"cross_org_uuids,omitempty"`
DataSource *FormulaAndFunctionEventsDataSource `json:"data_source"`
GroupBy []FormulaAndFunctionEventQueryGroupBy `json:"group_by,omitempty"`
GroupBy *FormulaAndFunctionEventQueryGroupByConfig `json:"group_by,omitempty"`
Indexes []string `json:"indexes,omitempty"`
Name *string `json:"name"`
Search *FormulaAndFunctionEventQueryDefinitionSearch `json:"search,omitempty"`
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2019-Present Datadog, Inc.

package datadogV1

import (
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
)

// FormulaAndFunctionEventQueryGroupByConfig - Group by configuration for a formula and functions events query. Can be a list of facet objects or a flat object with a list of fields.
type FormulaAndFunctionEventQueryGroupByConfig struct {
FormulaAndFunctionEventQueryGroupByList *[]FormulaAndFunctionEventQueryGroupBy
FormulaAndFunctionEventQueryGroupByFields *FormulaAndFunctionEventQueryGroupByFields

// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
UnparsedObject interface{}
}

// FormulaAndFunctionEventQueryGroupByListAsFormulaAndFunctionEventQueryGroupByConfig is a convenience function that returns []FormulaAndFunctionEventQueryGroupBy wrapped in FormulaAndFunctionEventQueryGroupByConfig.
func FormulaAndFunctionEventQueryGroupByListAsFormulaAndFunctionEventQueryGroupByConfig(v *[]FormulaAndFunctionEventQueryGroupBy) FormulaAndFunctionEventQueryGroupByConfig {
return FormulaAndFunctionEventQueryGroupByConfig{FormulaAndFunctionEventQueryGroupByList: v}
}

// FormulaAndFunctionEventQueryGroupByFieldsAsFormulaAndFunctionEventQueryGroupByConfig is a convenience function that returns FormulaAndFunctionEventQueryGroupByFields wrapped in FormulaAndFunctionEventQueryGroupByConfig.
func FormulaAndFunctionEventQueryGroupByFieldsAsFormulaAndFunctionEventQueryGroupByConfig(v *FormulaAndFunctionEventQueryGroupByFields) FormulaAndFunctionEventQueryGroupByConfig {
return FormulaAndFunctionEventQueryGroupByConfig{FormulaAndFunctionEventQueryGroupByFields: v}
}

// UnmarshalJSON turns data into one of the pointers in the struct.
func (obj *FormulaAndFunctionEventQueryGroupByConfig) UnmarshalJSON(data []byte) error {
var err error
match := 0
// try to unmarshal data into FormulaAndFunctionEventQueryGroupByList
err = datadog.Unmarshal(data, &obj.FormulaAndFunctionEventQueryGroupByList)
if err == nil {
if obj.FormulaAndFunctionEventQueryGroupByList != nil {
jsonFormulaAndFunctionEventQueryGroupByList, _ := datadog.Marshal(obj.FormulaAndFunctionEventQueryGroupByList)
if string(jsonFormulaAndFunctionEventQueryGroupByList) == "{}" && string(data) != "{}" { // empty struct
obj.FormulaAndFunctionEventQueryGroupByList = nil
} else {
match++
}
} else {
obj.FormulaAndFunctionEventQueryGroupByList = nil
}
} else {
obj.FormulaAndFunctionEventQueryGroupByList = nil
}

// try to unmarshal data into FormulaAndFunctionEventQueryGroupByFields
err = datadog.Unmarshal(data, &obj.FormulaAndFunctionEventQueryGroupByFields)
if err == nil {
if obj.FormulaAndFunctionEventQueryGroupByFields != nil && obj.FormulaAndFunctionEventQueryGroupByFields.UnparsedObject == nil {
jsonFormulaAndFunctionEventQueryGroupByFields, _ := datadog.Marshal(obj.FormulaAndFunctionEventQueryGroupByFields)
if string(jsonFormulaAndFunctionEventQueryGroupByFields) == "{}" { // empty struct
obj.FormulaAndFunctionEventQueryGroupByFields = nil
} else {
match++
}
} else {
obj.FormulaAndFunctionEventQueryGroupByFields = nil
}
} else {
obj.FormulaAndFunctionEventQueryGroupByFields = nil
}

if match != 1 { // more than 1 match
// reset to nil
obj.FormulaAndFunctionEventQueryGroupByList = nil
obj.FormulaAndFunctionEventQueryGroupByFields = nil
return datadog.Unmarshal(data, &obj.UnparsedObject)
}
return nil // exactly one match
}

// MarshalJSON turns data from the first non-nil pointers in the struct to JSON.
func (obj FormulaAndFunctionEventQueryGroupByConfig) MarshalJSON() ([]byte, error) {
if obj.FormulaAndFunctionEventQueryGroupByList != nil {
return datadog.Marshal(&obj.FormulaAndFunctionEventQueryGroupByList)
}

if obj.FormulaAndFunctionEventQueryGroupByFields != nil {
return datadog.Marshal(&obj.FormulaAndFunctionEventQueryGroupByFields)
}

if obj.UnparsedObject != nil {
return datadog.Marshal(obj.UnparsedObject)
}
return nil, nil // no data in oneOf schemas
}

// GetActualInstance returns the actual instance.
func (obj *FormulaAndFunctionEventQueryGroupByConfig) GetActualInstance() interface{} {
if obj.FormulaAndFunctionEventQueryGroupByList != nil {
return obj.FormulaAndFunctionEventQueryGroupByList
}

if obj.FormulaAndFunctionEventQueryGroupByFields != nil {
return obj.FormulaAndFunctionEventQueryGroupByFields
}

// all schemas are nil
return nil
}
Loading
Loading