Skip to content

Commit

Permalink
Regenerate client from commit ed8eeb93 of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Sep 13, 2024
1 parent 9433a7f commit 1cdba04
Show file tree
Hide file tree
Showing 17 changed files with 1,714 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2024-09-13 13:31:33.088278",
"spec_repo_commit": "bee8c3e1"
"regenerated": "2024-09-13 17:12:22.288905",
"spec_repo_commit": "ed8eeb93"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-09-13 13:31:33.106799",
"spec_repo_commit": "bee8c3e1"
"regenerated": "2024-09-13 17:12:22.306985",
"spec_repo_commit": "ed8eeb93"
}
}
}
175 changes: 175 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16752,6 +16752,181 @@ components:
$ref: '#/components/schemas/LogQueryDefinition'
sort:
$ref: '#/components/schemas/WidgetSortBy'
text_formats:
description: List of text formats for columns produced by tags.
items:
$ref: '#/components/schemas/TableWidgetTextFormat'
type: array
type: object
TableWidgetTextFormat:
description: Text format rules for a tag-based column within a table widget.
example:
- match:
type: is
value: fruit
replace:
type: all
with: vegetable
- match:
type: is
value: cake
palette: white_on_green
items:
$ref: '#/components/schemas/TableWidgetTextFormatRule'
minItems: 1
type: array
TableWidgetTextFormatMatch:
description: Match rule for the table widget text format.
example:
type: is
value: fruit
properties:
type:
$ref: '#/components/schemas/TableWidgetTextFormatMatchType'
value:
description: Table Widget Match String.
example: Match Value
type: string
required:
- type
- value
type: object
TableWidgetTextFormatMatchType:
description: Match or compare option.
enum:
- is
- is_not
- contains
- does_not_contain
- starts_with
- ends_with
example: is
type: string
x-enum-varnames:
- IS
- IS_NOT
- CONTAINS
- DOES_NOT_CONTAIN
- STARTS_WITH
- ENDS_WITH
TableWidgetTextFormatPalette:
default: white_on_green
description: Color-on-color palette to highlight replaced text.
enum:
- white_on_red
- white_on_yellow
- white_on_green
- black_on_light_red
- black_on_light_yellow
- black_on_light_green
- red_on_white
- yellow_on_white
- green_on_white
- custom_bg
- custom_text
type: string
x-enum-varnames:
- WHITE_ON_RED
- WHITE_ON_YELLOW
- WHITE_ON_GREEN
- BLACK_ON_LIGHT_RED
- BLACK_ON_LIGHT_YELLOW
- BLACK_ON_LIGHT_GREEN
- RED_ON_WHITE
- YELLOW_ON_WHITE
- GREEN_ON_WHITE
- CUSTOM_BG
- CUSTOM_TEXT
TableWidgetTextFormatReplace:
description: Replace rule for the table widget text format.
example:
type: all
with: vegetable
oneOf:
- $ref: '#/components/schemas/TableWidgetTextFormatReplaceAll'
- $ref: '#/components/schemas/TableWidgetTextFormatReplaceSubstring'
TableWidgetTextFormatReplaceAll:
description: Match All definition.
example:
type: all
with: vegetable
properties:
type:
$ref: '#/components/schemas/TableWidgetTextFormatReplaceAllType'
with:
description: Replace All type.
example: all
type: string
required:
- type
- with
type: object
TableWidgetTextFormatReplaceAllType:
description: Table widget text format replace all type.
enum:
- all
example: all
type: string
x-enum-varnames:
- ALL
TableWidgetTextFormatReplaceSubstring:
description: Match Sub-string definition.
example:
substring: fruit
type: substring
with: vegetable
properties:
substring:
description: Text that will be replaced.
example: string to replace
type: string
type:
$ref: '#/components/schemas/TableWidgetTextFormatReplaceSubstringType'
with:
description: Text that will replace original sub-string.
example: replacement
type: string
required:
- type
- with
- substring
type: object
TableWidgetTextFormatReplaceSubstringType:
description: Table widget text format replace sub-string type.
enum:
- substring
example: substring
type: string
x-enum-varnames:
- SUBSTRING
TableWidgetTextFormatRule:
description: Text format rules.
example:
match:
type: is
value: apple
replace:
type: all
with: vegetable
properties:
custom_bg_color:
description: Hex representation of the custom background color. Used with
custom background palette option.
example: '#632ca6'
type: string
custom_fg_color:
description: Hex representation of the custom text color. Used with custom
text palette option.
example: '#632ca6'
type: string
match:
$ref: '#/components/schemas/TableWidgetTextFormatMatch'
palette:
$ref: '#/components/schemas/TableWidgetTextFormatPalette'
replace:
$ref: '#/components/schemas/TableWidgetTextFormatReplace'
required:
- match
type: object
TagToHosts:
description: In this object, the key is the tag, the value is a list of host
Expand Down
37 changes: 36 additions & 1 deletion api/datadogV1/model_table_widget_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ type TableWidgetRequest struct {
SecurityQuery *LogQueryDefinition `json:"security_query,omitempty"`
// The controls for sorting the widget.
Sort *WidgetSortBy `json:"sort,omitempty"`
// List of text formats for columns produced by tags.
TextFormats [][]TableWidgetTextFormatRule `json:"text_formats,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 Down Expand Up @@ -632,6 +634,34 @@ func (o *TableWidgetRequest) SetSort(v WidgetSortBy) {
o.Sort = &v
}

// GetTextFormats returns the TextFormats field value if set, zero value otherwise.
func (o *TableWidgetRequest) GetTextFormats() [][]TableWidgetTextFormatRule {
if o == nil || o.TextFormats == nil {
var ret [][]TableWidgetTextFormatRule
return ret
}
return o.TextFormats
}

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

// HasTextFormats returns a boolean if a field has been set.
func (o *TableWidgetRequest) HasTextFormats() bool {
return o != nil && o.TextFormats != nil
}

// SetTextFormats gets a reference to the given [][]TableWidgetTextFormatRule and assigns it to the TextFormats field.
func (o *TableWidgetRequest) SetTextFormats(v [][]TableWidgetTextFormatRule) {
o.TextFormats = v
}

// MarshalJSON serializes the struct using spec logic.
func (o TableWidgetRequest) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
Expand Down Expand Up @@ -698,6 +728,9 @@ func (o TableWidgetRequest) MarshalJSON() ([]byte, error) {
if o.Sort != nil {
toSerialize["sort"] = o.Sort
}
if o.TextFormats != nil {
toSerialize["text_formats"] = o.TextFormats
}

for key, value := range o.AdditionalProperties {
toSerialize[key] = value
Expand Down Expand Up @@ -728,13 +761,14 @@ func (o *TableWidgetRequest) UnmarshalJSON(bytes []byte) (err error) {
RumQuery *LogQueryDefinition `json:"rum_query,omitempty"`
SecurityQuery *LogQueryDefinition `json:"security_query,omitempty"`
Sort *WidgetSortBy `json:"sort,omitempty"`
TextFormats [][]TableWidgetTextFormatRule `json:"text_formats,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{"aggregator", "alias", "apm_query", "apm_stats_query", "cell_display_mode", "conditional_formats", "event_query", "formulas", "limit", "log_query", "network_query", "order", "process_query", "profile_metrics_query", "q", "queries", "response_format", "rum_query", "security_query", "sort"})
datadog.DeleteKeys(additionalProperties, &[]string{"aggregator", "alias", "apm_query", "apm_stats_query", "cell_display_mode", "conditional_formats", "event_query", "formulas", "limit", "log_query", "network_query", "order", "process_query", "profile_metrics_query", "q", "queries", "response_format", "rum_query", "security_query", "sort", "text_formats"})
} else {
return err
}
Expand Down Expand Up @@ -802,6 +836,7 @@ func (o *TableWidgetRequest) UnmarshalJSON(bytes []byte) (err error) {
hasInvalidField = true
}
o.Sort = all.Sort
o.TextFormats = all.TextFormats

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

0 comments on commit 1cdba04

Please sign in to comment.