Skip to content

Commit 92f15d0

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
and
ci.datadog-api-spec
authored
Powerpack add support for prefix and available values (#2011)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 98e6cb6 commit 92f15d0

File tree

3 files changed

+57
-8
lines changed

3 files changed

+57
-8
lines changed

.apigentools-info

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2024-09-16 14:02:51.222172",
8-
"spec_repo_commit": "966987f5"
7+
"regenerated": "2024-09-18 14:45:18.857935",
8+
"spec_repo_commit": "bae57ce1"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-09-16 14:02:51.240032",
13-
"spec_repo_commit": "966987f5"
12+
"regenerated": "2024-09-18 14:45:18.876103",
13+
"spec_repo_commit": "bae57ce1"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

+18
Original file line numberDiff line numberDiff line change
@@ -16297,6 +16297,18 @@ components:
1629716297
PowerpackTemplateVariable:
1629816298
description: Powerpack template variables.
1629916299
properties:
16300+
available_values:
16301+
description: The list of values that the template variable drop-down is
16302+
limited to.
16303+
example:
16304+
- my-host
16305+
- host1
16306+
- host2
16307+
items:
16308+
description: Template variable value.
16309+
type: string
16310+
nullable: true
16311+
type: array
1630016312
defaults:
1630116313
description: One or many template variable default values within the saved
1630216314
view, which are unioned together using `OR` if more than one is specified.
@@ -16309,6 +16321,12 @@ components:
1630916321
description: The name of the variable.
1631016322
example: datacenter
1631116323
type: string
16324+
prefix:
16325+
description: The tag prefix associated with the variable. Only tags with
16326+
this prefix appear in the variable drop-down.
16327+
example: host
16328+
nullable: true
16329+
type: string
1631216330
required:
1631316331
- name
1631416332
type: object

lib/datadog_api_client/v2/models/powerpack_template_variable.rb

+35-4
Original file line numberDiff line numberDiff line change
@@ -21,32 +21,51 @@ module DatadogAPIClient::V2
2121
class PowerpackTemplateVariable
2222
include BaseGenericModel
2323

24+
# The list of values that the template variable drop-down is limited to.
25+
attr_accessor :available_values
26+
2427
# One or many template variable default values within the saved view, which are unioned together using `OR` if more than one is specified.
2528
attr_accessor :defaults
2629

2730
# The name of the variable.
2831
attr_reader :name
2932

33+
# The tag prefix associated with the variable. Only tags with this prefix appear in the variable drop-down.
34+
attr_accessor :prefix
35+
3036
attr_accessor :additional_properties
3137

3238
# Attribute mapping from ruby-style variable name to JSON key.
3339
# @!visibility private
3440
def self.attribute_map
3541
{
42+
:'available_values' => :'available_values',
3643
:'defaults' => :'defaults',
37-
:'name' => :'name'
44+
:'name' => :'name',
45+
:'prefix' => :'prefix'
3846
}
3947
end
4048

4149
# Attribute type mapping.
4250
# @!visibility private
4351
def self.openapi_types
4452
{
53+
:'available_values' => :'Array<String>',
4554
:'defaults' => :'Array<String>',
46-
:'name' => :'String'
55+
:'name' => :'String',
56+
:'prefix' => :'String'
4757
}
4858
end
4959

60+
# List of attributes with nullable: true
61+
# @!visibility private
62+
def self.openapi_nullable
63+
Set.new([
64+
:'available_values',
65+
:'prefix',
66+
])
67+
end
68+
5069
# Initializes the object
5170
# @param attributes [Hash] Model attributes in the form of hash
5271
# @!visibility private
@@ -65,6 +84,12 @@ def initialize(attributes = {})
6584
end
6685
}
6786

87+
if attributes.key?(:'available_values')
88+
if (value = attributes[:'available_values']).is_a?(Array)
89+
self.available_values = value
90+
end
91+
end
92+
6893
if attributes.key?(:'defaults')
6994
if (value = attributes[:'defaults']).is_a?(Array)
7095
self.defaults = value
@@ -74,6 +99,10 @@ def initialize(attributes = {})
7499
if attributes.key?(:'name')
75100
self.name = attributes[:'name']
76101
end
102+
103+
if attributes.key?(:'prefix')
104+
self.prefix = attributes[:'prefix']
105+
end
77106
end
78107

79108
# Check to see if the all the properties in the model are valid
@@ -120,16 +149,18 @@ def to_hash
120149
def ==(o)
121150
return true if self.equal?(o)
122151
self.class == o.class &&
152+
available_values == o.available_values &&
123153
defaults == o.defaults &&
124-
name == o.name
154+
name == o.name &&
155+
prefix == o.prefix
125156
additional_properties == o.additional_properties
126157
end
127158

128159
# Calculates hash code according to all attributes.
129160
# @return [Integer] Hash code
130161
# @!visibility private
131162
def hash
132-
[defaults, name].hash
163+
[available_values, defaults, name, prefix].hash
133164
end
134165
end
135166
end

0 commit comments

Comments
 (0)