Skip to content

Commit 9078846

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit e9ac191 of spec repo (#950)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
1 parent 72ca579 commit 9078846

File tree

5 files changed

+91
-12
lines changed

5 files changed

+91
-12
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.4.1.dev11",
7-
"regenerated": "2021-08-27 15:15:14.535937",
8-
"spec_repo_commit": "04b2dd3"
7+
"regenerated": "2021-09-03 13:54:25.660852",
8+
"spec_repo_commit": "e9ac191"
99
},
1010
"v2": {
1111
"apigentools_version": "1.4.1.dev11",
12-
"regenerated": "2021-08-27 15:16:03.083324",
13-
"spec_repo_commit": "04b2dd3"
12+
"regenerated": "2021-09-03 13:55:16.624933",
13+
"spec_repo_commit": "e9ac191"
1414
}
1515
}
1616
}

api_docs/v1/DashboardTemplateVariable.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Template variable.
88

99
Name | Type | Description | Notes
1010
------------ | ------------- | ------------- | -------------
11+
**availableValues** | **List&lt;String&gt;** | The list of values that the template variable drop-down is limited to. | [optional]
1112
**_default** | **String** | The default value for the template variable on dashboard load. | [optional]
1213
**name** | **String** | The name of the variable. |
1314
**prefix** | **String** | The tag prefix associated with the variable. Only tags with this prefix appear in the variable drop-down. | [optional]

src/main/java/com/datadog/api/v1/client/model/DashboardTemplateVariable.java

Lines changed: 56 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,25 @@
1717
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
1818
import io.swagger.annotations.ApiModel;
1919
import io.swagger.annotations.ApiModelProperty;
20+
import java.util.ArrayList;
21+
import java.util.List;
2022
import java.util.Objects;
2123
import org.openapitools.jackson.nullable.JsonNullable;
2224

2325
/** Template variable. */
2426
@ApiModel(description = "Template variable.")
2527
@JsonPropertyOrder({
28+
DashboardTemplateVariable.JSON_PROPERTY_AVAILABLE_VALUES,
2629
DashboardTemplateVariable.JSON_PROPERTY_DEFAULT,
2730
DashboardTemplateVariable.JSON_PROPERTY_NAME,
2831
DashboardTemplateVariable.JSON_PROPERTY_PREFIX
2932
})
3033
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
3134
public class DashboardTemplateVariable {
3235
@JsonIgnore public boolean unparsed = false;
36+
public static final String JSON_PROPERTY_AVAILABLE_VALUES = "available_values";
37+
private JsonNullable<List<String>> availableValues = JsonNullable.<List<String>>undefined();
38+
3339
public static final String JSON_PROPERTY_DEFAULT = "default";
3440
private JsonNullable<String> _default = JsonNullable.<String>undefined();
3541

@@ -47,6 +53,52 @@ public DashboardTemplateVariable(
4753
this.name = name;
4854
}
4955

56+
public DashboardTemplateVariable availableValues(List<String> availableValues) {
57+
this.availableValues = JsonNullable.<List<String>>of(availableValues);
58+
return this;
59+
}
60+
61+
public DashboardTemplateVariable addAvailableValuesItem(String availableValuesItem) {
62+
if (this.availableValues == null || !this.availableValues.isPresent()) {
63+
this.availableValues = JsonNullable.<List<String>>of(new ArrayList<>());
64+
}
65+
try {
66+
this.availableValues.get().add(availableValuesItem);
67+
} catch (java.util.NoSuchElementException e) {
68+
// this can never happen, as we make sure above that the value is present
69+
}
70+
return this;
71+
}
72+
73+
/**
74+
* The list of values that the template variable drop-down is limited to.
75+
*
76+
* @return availableValues
77+
*/
78+
@javax.annotation.Nullable
79+
@ApiModelProperty(
80+
example = "[\"my-host\",\"host1\",\"host2\"]",
81+
value = "The list of values that the template variable drop-down is limited to.")
82+
@JsonIgnore
83+
public List<String> getAvailableValues() {
84+
return availableValues.orElse(null);
85+
}
86+
87+
@JsonProperty(JSON_PROPERTY_AVAILABLE_VALUES)
88+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
89+
public JsonNullable<List<String>> getAvailableValues_JsonNullable() {
90+
return availableValues;
91+
}
92+
93+
@JsonProperty(JSON_PROPERTY_AVAILABLE_VALUES)
94+
public void setAvailableValues_JsonNullable(JsonNullable<List<String>> availableValues) {
95+
this.availableValues = availableValues;
96+
}
97+
98+
public void setAvailableValues(List<String> availableValues) {
99+
this.availableValues = JsonNullable.<List<String>>of(availableValues);
100+
}
101+
50102
public DashboardTemplateVariable _default(String _default) {
51103
this._default = JsonNullable.<String>of(_default);
52104
return this;
@@ -149,20 +201,22 @@ public boolean equals(Object o) {
149201
return false;
150202
}
151203
DashboardTemplateVariable dashboardTemplateVariable = (DashboardTemplateVariable) o;
152-
return Objects.equals(this._default, dashboardTemplateVariable._default)
204+
return Objects.equals(this.availableValues, dashboardTemplateVariable.availableValues)
205+
&& Objects.equals(this._default, dashboardTemplateVariable._default)
153206
&& Objects.equals(this.name, dashboardTemplateVariable.name)
154207
&& Objects.equals(this.prefix, dashboardTemplateVariable.prefix);
155208
}
156209

157210
@Override
158211
public int hashCode() {
159-
return Objects.hash(_default, name, prefix);
212+
return Objects.hash(availableValues, _default, name, prefix);
160213
}
161214

162215
@Override
163216
public String toString() {
164217
StringBuilder sb = new StringBuilder();
165218
sb.append("class DashboardTemplateVariable {\n");
219+
sb.append(" availableValues: ").append(toIndentedString(availableValues)).append("\n");
166220
sb.append(" _default: ").append(toIndentedString(_default)).append("\n");
167221
sb.append(" name: ").append(toIndentedString(name)).append("\n");
168222
sb.append(" prefix: ").append(toIndentedString(prefix)).append("\n");

src/main/java/com/datadog/api/v1/openapi.yaml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11466,9 +11466,17 @@ components:
1146611466
- default: my-host
1146711467
prefix: host
1146811468
name: host1
11469+
available_values:
11470+
- my-host
11471+
- host1
11472+
- host2
1146911473
- default: my-host
1147011474
prefix: host
1147111475
name: host1
11476+
available_values:
11477+
- my-host
11478+
- host1
11479+
- host2
1147211480
url: /dashboard/123-abc-456/example-dashboard-title
1147311481
is_read_only: false
1147411482
id: 123-abc-456
@@ -11836,7 +11844,23 @@ components:
1183611844
default: my-host
1183711845
prefix: host
1183811846
name: host1
11839-
properties:
11847+
available_values:
11848+
- my-host
11849+
- host1
11850+
- host2
11851+
properties:
11852+
available_values:
11853+
description: The list of values that the template variable drop-down is
11854+
limited to.
11855+
example:
11856+
- my-host
11857+
- host1
11858+
- host2
11859+
items:
11860+
description: Template variable value.
11861+
type: string
11862+
nullable: true
11863+
type: array
1184011864
default:
1184111865
description: The default value for the template variable on dashboard load.
1184211866
example: my-host

src/test/resources/com/datadog/api/v1/client/api/dashboards.feature

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ Feature: Dashboards
1212
@generated @skip
1313
Scenario: Create a new dashboard returns "Bad Request" response
1414
Given new "CreateDashboard" request
15-
And body with value {"description": null, "is_read_only": false, "layout_type": "ordered", "notify_list": [null], "reflow_type": "auto", "restricted_roles": [null], "template_variable_presets": [{"name": null, "template_variables": [{"name": null, "value": null}]}], "template_variables": [{"default": "my-host", "name": "host1", "prefix": "host"}], "title": "", "widgets": [{"definition": {"requests": {"fill": {"q": "system.cpu.user"}}, "type": "hostmap"}}]}
15+
And body with value {"description": null, "is_read_only": false, "layout_type": "ordered", "notify_list": [null], "reflow_type": "auto", "restricted_roles": [null], "template_variable_presets": [{"name": null, "template_variables": [{"name": null, "value": null}]}], "template_variables": [{"available_values": ["my-host", "host1", "host2"], "default": "my-host", "name": "host1", "prefix": "host"}], "title": "", "widgets": [{"definition": {"requests": {"fill": {"q": "system.cpu.user"}}, "type": "hostmap"}}]}
1616
When the request is sent
1717
Then the response status is 400 Bad Request
1818

1919
@generated @skip
2020
Scenario: Create a new dashboard returns "OK" response
2121
Given new "CreateDashboard" request
22-
And body with value {"description": null, "is_read_only": false, "layout_type": "ordered", "notify_list": [null], "reflow_type": "auto", "restricted_roles": [null], "template_variable_presets": [{"name": null, "template_variables": [{"name": null, "value": null}]}], "template_variables": [{"default": "my-host", "name": "host1", "prefix": "host"}], "title": "", "widgets": [{"definition": {"requests": {"fill": {"q": "system.cpu.user"}}, "type": "hostmap"}}]}
22+
And body with value {"description": null, "is_read_only": false, "layout_type": "ordered", "notify_list": [null], "reflow_type": "auto", "restricted_roles": [null], "template_variable_presets": [{"name": null, "template_variables": [{"name": null, "value": null}]}], "template_variables": [{"available_values": ["my-host", "host1", "host2"], "default": "my-host", "name": "host1", "prefix": "host"}], "title": "", "widgets": [{"definition": {"requests": {"fill": {"q": "system.cpu.user"}}, "type": "hostmap"}}]}
2323
When the request is sent
2424
Then the response status is 200 OK
2525

@@ -138,22 +138,22 @@ Feature: Dashboards
138138
Scenario: Update a dashboard returns "Bad Request" response
139139
Given new "UpdateDashboard" request
140140
And request contains "dashboard_id" parameter from "<PATH>"
141-
And body with value {"description": null, "is_read_only": false, "layout_type": "ordered", "notify_list": [null], "reflow_type": "auto", "restricted_roles": [null], "template_variable_presets": [{"name": null, "template_variables": [{"name": null, "value": null}]}], "template_variables": [{"default": "my-host", "name": "host1", "prefix": "host"}], "title": "", "widgets": [{"definition": {"requests": {"fill": {"q": "system.cpu.user"}}, "type": "hostmap"}}]}
141+
And body with value {"description": null, "is_read_only": false, "layout_type": "ordered", "notify_list": [null], "reflow_type": "auto", "restricted_roles": [null], "template_variable_presets": [{"name": null, "template_variables": [{"name": null, "value": null}]}], "template_variables": [{"available_values": ["my-host", "host1", "host2"], "default": "my-host", "name": "host1", "prefix": "host"}], "title": "", "widgets": [{"definition": {"requests": {"fill": {"q": "system.cpu.user"}}, "type": "hostmap"}}]}
142142
When the request is sent
143143
Then the response status is 400 Bad Request
144144

145145
@generated @skip
146146
Scenario: Update a dashboard returns "Item Not Found" response
147147
Given new "UpdateDashboard" request
148148
And request contains "dashboard_id" parameter from "<PATH>"
149-
And body with value {"description": null, "is_read_only": false, "layout_type": "ordered", "notify_list": [null], "reflow_type": "auto", "restricted_roles": [null], "template_variable_presets": [{"name": null, "template_variables": [{"name": null, "value": null}]}], "template_variables": [{"default": "my-host", "name": "host1", "prefix": "host"}], "title": "", "widgets": [{"definition": {"requests": {"fill": {"q": "system.cpu.user"}}, "type": "hostmap"}}]}
149+
And body with value {"description": null, "is_read_only": false, "layout_type": "ordered", "notify_list": [null], "reflow_type": "auto", "restricted_roles": [null], "template_variable_presets": [{"name": null, "template_variables": [{"name": null, "value": null}]}], "template_variables": [{"available_values": ["my-host", "host1", "host2"], "default": "my-host", "name": "host1", "prefix": "host"}], "title": "", "widgets": [{"definition": {"requests": {"fill": {"q": "system.cpu.user"}}, "type": "hostmap"}}]}
150150
When the request is sent
151151
Then the response status is 404 Item Not Found
152152

153153
@generated @skip
154154
Scenario: Update a dashboard returns "OK" response
155155
Given new "UpdateDashboard" request
156156
And request contains "dashboard_id" parameter from "<PATH>"
157-
And body with value {"description": null, "is_read_only": false, "layout_type": "ordered", "notify_list": [null], "reflow_type": "auto", "restricted_roles": [null], "template_variable_presets": [{"name": null, "template_variables": [{"name": null, "value": null}]}], "template_variables": [{"default": "my-host", "name": "host1", "prefix": "host"}], "title": "", "widgets": [{"definition": {"requests": {"fill": {"q": "system.cpu.user"}}, "type": "hostmap"}}]}
157+
And body with value {"description": null, "is_read_only": false, "layout_type": "ordered", "notify_list": [null], "reflow_type": "auto", "restricted_roles": [null], "template_variable_presets": [{"name": null, "template_variables": [{"name": null, "value": null}]}], "template_variables": [{"available_values": ["my-host", "host1", "host2"], "default": "my-host", "name": "host1", "prefix": "host"}], "title": "", "widgets": [{"definition": {"requests": {"fill": {"q": "system.cpu.user"}}, "type": "hostmap"}}]}
158158
When the request is sent
159159
Then the response status is 200 OK

0 commit comments

Comments
 (0)