Skip to content

Commit 7f298ba

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit a7d0953 of spec repo
1 parent 47262ff commit 7f298ba

File tree

55 files changed

+5829
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+5829
-4
lines changed

.generator/schemas/v1/openapi.yaml

Lines changed: 773 additions & 2 deletions
Large diffs are not rendered by default.

.generator/schemas/v2/openapi.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102212,6 +102212,13 @@ paths:
102212102212
get:
102213102213
description: Get the list of all critical assets.
102214102214
operationId: ListSecurityMonitoringCriticalAssets
102215+
parameters:
102216+
- description: Query string.
102217+
in: query
102218+
name: query
102219+
required: false
102220+
schema:
102221+
type: string
102215102222
responses:
102216102223
'200':
102217102224
content:

features/scenarios_model_mapping.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,6 +1607,9 @@
16071607
"filter_operating_system_name" => "String",
16081608
"filter_operating_system_version" => "String",
16091609
},
1610+
"v2.ListSecurityMonitoringCriticalAssets" => {
1611+
"query" => "String",
1612+
},
16101613
"v2.CreateSecurityMonitoringCriticalAsset" => {
16111614
"body" => "SecurityMonitoringCriticalAssetCreateRequest",
16121615
},

lib/datadog_api_client/inflector.rb

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,54 @@ def overrides
179179
"v1.group_type" => "GroupType",
180180
"v1.group_widget_definition" => "GroupWidgetDefinition",
181181
"v1.group_widget_definition_type" => "GroupWidgetDefinitionType",
182+
"v1.guided_table_column" => "GuidedTableColumn",
183+
"v1.guided_table_column_comparison" => "GuidedTableColumnComparison",
184+
"v1.guided_table_column_comparison_with_other_column" => "GuidedTableColumnComparisonWithOtherColumn",
185+
"v1.guided_table_column_comparison_with_other_column_type" => "GuidedTableColumnComparisonWithOtherColumnType",
186+
"v1.guided_table_column_comparison_with_self" => "GuidedTableColumnComparisonWithSelf",
187+
"v1.guided_table_column_comparison_with_self_type" => "GuidedTableColumnComparisonWithSelfType",
188+
"v1.guided_table_column_format" => "GuidedTableColumnFormat",
189+
"v1.guided_table_column_function" => "GuidedTableColumnFunction",
190+
"v1.guided_table_column_function_args_item" => "GuidedTableColumnFunctionArgsItem",
191+
"v1.guided_table_compute_column" => "GuidedTableComputeColumn",
192+
"v1.guided_table_compute_column_compute" => "GuidedTableComputeColumnCompute",
193+
"v1.guided_table_compute_column_type" => "GuidedTableComputeColumnType",
194+
"v1.guided_table_conditional_formats" => "GuidedTableConditionalFormats",
195+
"v1.guided_table_events_query" => "GuidedTableEventsQuery",
196+
"v1.guided_table_events_query_data_source" => "GuidedTableEventsQueryDataSource",
197+
"v1.guided_table_events_query_search" => "GuidedTableEventsQuerySearch",
198+
"v1.guided_table_formula_column" => "GuidedTableFormulaColumn",
199+
"v1.guided_table_group_key" => "GuidedTableGroupKey",
200+
"v1.guided_table_metrics_query" => "GuidedTableMetricsQuery",
201+
"v1.guided_table_metrics_query_data_source" => "GuidedTableMetricsQueryDataSource",
202+
"v1.guided_table_number_bar_column_format" => "GuidedTableNumberBarColumnFormat",
203+
"v1.guided_table_number_bar_column_format_mode" => "GuidedTableNumberBarColumnFormatMode",
204+
"v1.guided_table_number_format" => "GuidedTableNumberFormat",
205+
"v1.guided_table_number_format_precision" => "GuidedTableNumberFormatPrecision",
206+
"v1.guided_table_preset_column" => "GuidedTablePresetColumn",
207+
"v1.guided_table_preset_column_preset" => "GuidedTablePresetColumnPreset",
208+
"v1.guided_table_preset_column_preset_type" => "GuidedTablePresetColumnPresetType",
209+
"v1.guided_table_preset_column_type" => "GuidedTablePresetColumnType",
210+
"v1.guided_table_query" => "GuidedTableQuery",
211+
"v1.guided_table_range_formatting_rule" => "GuidedTableRangeFormattingRule",
212+
"v1.guided_table_range_formatting_rule_scale" => "GuidedTableRangeFormattingRuleScale",
213+
"v1.guided_table_range_formatting_rule_type" => "GuidedTableRangeFormattingRuleType",
214+
"v1.guided_table_range_palette" => "GuidedTableRangePalette",
215+
"v1.guided_table_request" => "GuidedTableRequest",
216+
"v1.guided_table_request_request_type" => "GuidedTableRequestRequestType",
217+
"v1.guided_table_row_group_by" => "GuidedTableRowGroupBy",
218+
"v1.guided_table_row_group_by_format" => "GuidedTableRowGroupByFormat",
219+
"v1.guided_table_rows" => "GuidedTableRows",
220+
"v1.guided_table_sort" => "GuidedTableSort",
221+
"v1.guided_table_storage_type" => "GuidedTableStorageType",
222+
"v1.guided_table_text_formatting_rule" => "GuidedTableTextFormattingRule",
223+
"v1.guided_table_text_formatting_rule_replace" => "GuidedTableTextFormattingRuleReplace",
224+
"v1.guided_table_text_formatting_rule_replace_one_of4484404608" => "GuidedTableTextFormattingRuleReplaceOneOf4484404608",
225+
"v1.guided_table_threshold_formatting_rule" => "GuidedTableThresholdFormattingRule",
226+
"v1.guided_table_threshold_formatting_rule_value" => "GuidedTableThresholdFormattingRuleValue",
227+
"v1.guided_table_threshold_palette" => "GuidedTableThresholdPalette",
228+
"v1.guided_table_trend_column_format" => "GuidedTableTrendColumnFormat",
229+
"v1.guided_table_trend_column_format_mode" => "GuidedTableTrendColumnFormatMode",
182230
"v1.heat_map_widget_definition" => "HeatMapWidgetDefinition",
183231
"v1.heat_map_widget_definition_type" => "HeatMapWidgetDefinitionType",
184232
"v1.heat_map_widget_request" => "HeatMapWidgetRequest",
@@ -800,6 +848,7 @@ def overrides
800848
"v1.synthetics_warning_type" => "SyntheticsWarningType",
801849
"v1.table_widget_cell_display_mode" => "TableWidgetCellDisplayMode",
802850
"v1.table_widget_definition" => "TableWidgetDefinition",
851+
"v1.table_widget_definition_requests_item" => "TableWidgetDefinitionRequestsItem",
803852
"v1.table_widget_definition_type" => "TableWidgetDefinitionType",
804853
"v1.table_widget_has_search_bar" => "TableWidgetHasSearchBar",
805854
"v1.table_widget_request" => "TableWidgetRequest",
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
=begin
2+
#Datadog API V1 Collection
3+
4+
#Collection of all Datadog Public endpoints.
5+
6+
The version of the OpenAPI document: 1.0
7+
Contact: support@datadoghq.com
8+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9+
10+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11+
This product includes software developed at Datadog (https://www.datadoghq.com/).
12+
Copyright 2020-Present Datadog, Inc.
13+
14+
=end
15+
16+
require 'date'
17+
require 'time'
18+
19+
module DatadogAPIClient::V1
20+
# Definition of a single column in a guided table widget. A column can be a computed value, a preset comparison, or a formula.
21+
module GuidedTableColumn
22+
class << self
23+
include BaseOneOfModel
24+
include BaseOneOfModelNoDiscriminator
25+
26+
# List of class defined in oneOf (OpenAPI v3)
27+
def openapi_one_of
28+
[
29+
:'GuidedTableComputeColumn',
30+
:'GuidedTablePresetColumn',
31+
:'GuidedTableFormulaColumn'
32+
]
33+
end
34+
# Builds the object
35+
# @param data [Mixed] Data to be matched against the list of oneOf items
36+
# @return [Object] Returns the model or the data itself
37+
def build(data)
38+
# Go through the list of oneOf items and attempt to identify the appropriate one.
39+
# Note:
40+
# - We do not attempt to check whether exactly one item matches.
41+
# - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
42+
# due to the way the deserialization is made in the base_object template (it just casts without verifying).
43+
# - TODO: scalar values are de facto behaving as if they were nullable.
44+
# - TODO: logging when debugging is set.
45+
openapi_one_of.each do |klass|
46+
begin
47+
next if klass == :AnyType # "nullable: true"
48+
typed_data = find_and_cast_into_type(klass, data)
49+
next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed
50+
return typed_data if typed_data
51+
rescue # rescue all errors so we keep iterating even if the current item lookup raises
52+
end
53+
end
54+
55+
if openapi_one_of.include?(:AnyType)
56+
data
57+
else
58+
self._unparsed = true
59+
DatadogAPIClient::UnparsedObject.new(data)
60+
end
61+
end
62+
end
63+
end
64+
end
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
=begin
2+
#Datadog API V1 Collection
3+
4+
#Collection of all Datadog Public endpoints.
5+
6+
The version of the OpenAPI document: 1.0
7+
Contact: support@datadoghq.com
8+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9+
10+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11+
This product includes software developed at Datadog (https://www.datadoghq.com/).
12+
Copyright 2020-Present Datadog, Inc.
13+
14+
=end
15+
16+
require 'date'
17+
require 'time'
18+
19+
module DatadogAPIClient::V1
20+
# Comparison to display in a guided table column.
21+
module GuidedTableColumnComparison
22+
class << self
23+
include BaseOneOfModel
24+
include BaseOneOfModelNoDiscriminator
25+
26+
# List of class defined in oneOf (OpenAPI v3)
27+
def openapi_one_of
28+
[
29+
:'GuidedTableColumnComparisonWithSelf',
30+
:'GuidedTableColumnComparisonWithOtherColumn'
31+
]
32+
end
33+
# Builds the object
34+
# @param data [Mixed] Data to be matched against the list of oneOf items
35+
# @return [Object] Returns the model or the data itself
36+
def build(data)
37+
# Go through the list of oneOf items and attempt to identify the appropriate one.
38+
# Note:
39+
# - We do not attempt to check whether exactly one item matches.
40+
# - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
41+
# due to the way the deserialization is made in the base_object template (it just casts without verifying).
42+
# - TODO: scalar values are de facto behaving as if they were nullable.
43+
# - TODO: logging when debugging is set.
44+
openapi_one_of.each do |klass|
45+
begin
46+
next if klass == :AnyType # "nullable: true"
47+
typed_data = find_and_cast_into_type(klass, data)
48+
next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed
49+
return typed_data if typed_data
50+
rescue # rescue all errors so we keep iterating even if the current item lookup raises
51+
end
52+
end
53+
54+
if openapi_one_of.include?(:AnyType)
55+
data
56+
else
57+
self._unparsed = true
58+
DatadogAPIClient::UnparsedObject.new(data)
59+
end
60+
end
61+
end
62+
end
63+
end
Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
=begin
2+
#Datadog API V1 Collection
3+
4+
#Collection of all Datadog Public endpoints.
5+
6+
The version of the OpenAPI document: 1.0
7+
Contact: support@datadoghq.com
8+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9+
10+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11+
This product includes software developed at Datadog (https://www.datadoghq.com/).
12+
Copyright 2020-Present Datadog, Inc.
13+
14+
=end
15+
16+
require 'date'
17+
require 'time'
18+
19+
module DatadogAPIClient::V1
20+
# Comparison of a column value against another column.
21+
class GuidedTableColumnComparisonWithOtherColumn
22+
include BaseGenericModel
23+
24+
# Name of the column to compare against.
25+
attr_reader :column
26+
27+
#
28+
attr_reader :type
29+
30+
attr_accessor :additional_properties
31+
32+
# Attribute mapping from ruby-style variable name to JSON key.
33+
# @!visibility private
34+
def self.attribute_map
35+
{
36+
:'column' => :'column',
37+
:'type' => :'type'
38+
}
39+
end
40+
41+
# Attribute type mapping.
42+
# @!visibility private
43+
def self.openapi_types
44+
{
45+
:'column' => :'String',
46+
:'type' => :'GuidedTableColumnComparisonWithOtherColumnType'
47+
}
48+
end
49+
50+
# Initializes the object
51+
# @param attributes [Hash] Model attributes in the form of hash
52+
# @!visibility private
53+
def initialize(attributes = {})
54+
if (!attributes.is_a?(Hash))
55+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::GuidedTableColumnComparisonWithOtherColumn` initialize method"
56+
end
57+
58+
self.additional_properties = {}
59+
# check to see if the attribute exists and convert string to symbol for hash key
60+
attributes = attributes.each_with_object({}) { |(k, v), h|
61+
if (!self.class.attribute_map.key?(k.to_sym))
62+
self.additional_properties[k.to_sym] = v
63+
else
64+
h[k.to_sym] = v
65+
end
66+
}
67+
68+
if attributes.key?(:'column')
69+
self.column = attributes[:'column']
70+
end
71+
72+
if attributes.key?(:'type')
73+
self.type = attributes[:'type']
74+
end
75+
end
76+
77+
# Check to see if the all the properties in the model are valid
78+
# @return true if the model is valid
79+
# @!visibility private
80+
def valid?
81+
return false if @column.nil?
82+
return false if @type.nil?
83+
true
84+
end
85+
86+
# Custom attribute writer method with validation
87+
# @param column [Object] Object to be assigned
88+
# @!visibility private
89+
def column=(column)
90+
if column.nil?
91+
fail ArgumentError, 'invalid value for "column", column cannot be nil.'
92+
end
93+
@column = column
94+
end
95+
96+
# Custom attribute writer method with validation
97+
# @param type [Object] Object to be assigned
98+
# @!visibility private
99+
def type=(type)
100+
if type.nil?
101+
fail ArgumentError, 'invalid value for "type", type cannot be nil.'
102+
end
103+
@type = type
104+
end
105+
106+
# Returns the object in the form of hash, with additionalProperties support.
107+
# @return [Hash] Returns the object in the form of hash
108+
# @!visibility private
109+
def to_hash
110+
hash = {}
111+
self.class.attribute_map.each_pair do |attr, param|
112+
value = self.send(attr)
113+
if value.nil?
114+
is_nullable = self.class.openapi_nullable.include?(attr)
115+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
116+
end
117+
118+
hash[param] = _to_hash(value)
119+
end
120+
self.additional_properties.each_pair do |attr, value|
121+
hash[attr] = value
122+
end
123+
hash
124+
end
125+
126+
# Checks equality by comparing each attribute.
127+
# @param o [Object] Object to be compared
128+
# @!visibility private
129+
def ==(o)
130+
return true if self.equal?(o)
131+
self.class == o.class &&
132+
column == o.column &&
133+
type == o.type &&
134+
additional_properties == o.additional_properties
135+
end
136+
137+
# Calculates hash code according to all attributes.
138+
# @return [Integer] Hash code
139+
# @!visibility private
140+
def hash
141+
[column, type, additional_properties].hash
142+
end
143+
end
144+
end
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
=begin
2+
#Datadog API V1 Collection
3+
4+
#Collection of all Datadog Public endpoints.
5+
6+
The version of the OpenAPI document: 1.0
7+
Contact: support@datadoghq.com
8+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9+
10+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11+
This product includes software developed at Datadog (https://www.datadoghq.com/).
12+
Copyright 2020-Present Datadog, Inc.
13+
14+
=end
15+
16+
require 'date'
17+
require 'time'
18+
19+
module DatadogAPIClient::V1
20+
#
21+
class GuidedTableColumnComparisonWithOtherColumnType
22+
include BaseEnumModel
23+
24+
DIFF_FROM = "diff_from".freeze
25+
PERCENT_OF = "percent_of".freeze
26+
PERCENT_DIFF_FROM = "percent_diff_from".freeze
27+
end
28+
end

0 commit comments

Comments
 (0)