Skip to content

Commit 415bb24

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 0c9866d of spec repo
1 parent 61d2b93 commit 415bb24

3 files changed

Lines changed: 229 additions & 3 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35536,6 +35536,21 @@ components:
3553635536
format: int64
3553735537
type: integer
3553835538
type: object
35539+
DeviceTagsBySource:
35540+
description: Tags associated with a device from a specific source.
35541+
properties:
35542+
source:
35543+
description: The source of the tags.
35544+
example: user
35545+
type: string
35546+
tags:
35547+
description: The list of tags for the source.
35548+
example: ["tag:test", "tag:testbis"]
35549+
items:
35550+
description: A tag string in `key:value` format.
35551+
type: string
35552+
type: array
35553+
type: object
3553935554
DevicesListData:
3554035555
description: The devices list data
3554135556
properties:
@@ -66353,6 +66368,12 @@ components:
6635366368
ListTagsResponseDataAttributes:
6635466369
description: The definition of ListTagsResponseDataAttributes object.
6635566370
properties:
66371+
by_source:
66372+
description: The list of device tags grouped by source.
66373+
items:
66374+
$ref: "#/components/schemas/DeviceTagsBySource"
66375+
readOnly: true
66376+
type: array
6635666377
tags:
6635766378
description: The list of tags
6635866379
example: ["tag:test", "tag:testbis"]
@@ -182771,6 +182792,20 @@ paths:
182771182792
content:
182772182793
application/json:
182773182794
examples:
182795+
by_source:
182796+
value:
182797+
data:
182798+
attributes:
182799+
by_source:
182800+
- source: user
182801+
tags:
182802+
- "tag:test"
182803+
- "tag:testbis"
182804+
- source: snmp
182805+
tags:
182806+
- "device_ip:1.2.3.4"
182807+
id: foiwf7rgw38fh
182808+
type: tags
182774182809
default:
182775182810
value:
182776182811
data:
Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
/*
2+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
3+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
4+
* Copyright 2019-Present Datadog, Inc.
5+
*/
6+
7+
package com.datadog.api.client.v2.model;
8+
9+
import com.fasterxml.jackson.annotation.JsonAnyGetter;
10+
import com.fasterxml.jackson.annotation.JsonAnySetter;
11+
import com.fasterxml.jackson.annotation.JsonIgnore;
12+
import com.fasterxml.jackson.annotation.JsonInclude;
13+
import com.fasterxml.jackson.annotation.JsonProperty;
14+
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
15+
import java.util.ArrayList;
16+
import java.util.HashMap;
17+
import java.util.List;
18+
import java.util.Map;
19+
import java.util.Objects;
20+
21+
/** Tags associated with a device from a specific source. */
22+
@JsonPropertyOrder({DeviceTagsBySource.JSON_PROPERTY_SOURCE, DeviceTagsBySource.JSON_PROPERTY_TAGS})
23+
@jakarta.annotation.Generated(
24+
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
25+
public class DeviceTagsBySource {
26+
@JsonIgnore public boolean unparsed = false;
27+
public static final String JSON_PROPERTY_SOURCE = "source";
28+
private String source;
29+
30+
public static final String JSON_PROPERTY_TAGS = "tags";
31+
private List<String> tags = null;
32+
33+
public DeviceTagsBySource source(String source) {
34+
this.source = source;
35+
return this;
36+
}
37+
38+
/**
39+
* The source of the tags.
40+
*
41+
* @return source
42+
*/
43+
@jakarta.annotation.Nullable
44+
@JsonProperty(JSON_PROPERTY_SOURCE)
45+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
46+
public String getSource() {
47+
return source;
48+
}
49+
50+
public void setSource(String source) {
51+
this.source = source;
52+
}
53+
54+
public DeviceTagsBySource tags(List<String> tags) {
55+
this.tags = tags;
56+
return this;
57+
}
58+
59+
public DeviceTagsBySource addTagsItem(String tagsItem) {
60+
if (this.tags == null) {
61+
this.tags = new ArrayList<>();
62+
}
63+
this.tags.add(tagsItem);
64+
return this;
65+
}
66+
67+
/**
68+
* The list of tags for the source.
69+
*
70+
* @return tags
71+
*/
72+
@jakarta.annotation.Nullable
73+
@JsonProperty(JSON_PROPERTY_TAGS)
74+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
75+
public List<String> getTags() {
76+
return tags;
77+
}
78+
79+
public void setTags(List<String> tags) {
80+
this.tags = tags;
81+
}
82+
83+
/**
84+
* A container for additional, undeclared properties. This is a holder for any undeclared
85+
* properties as specified with the 'additionalProperties' keyword in the OAS document.
86+
*/
87+
private Map<String, Object> additionalProperties;
88+
89+
/**
90+
* Set the additional (undeclared) property with the specified name and value. If the property
91+
* does not already exist, create it otherwise replace it.
92+
*
93+
* @param key The arbitrary key to set
94+
* @param value The associated value
95+
* @return DeviceTagsBySource
96+
*/
97+
@JsonAnySetter
98+
public DeviceTagsBySource putAdditionalProperty(String key, Object value) {
99+
if (this.additionalProperties == null) {
100+
this.additionalProperties = new HashMap<String, Object>();
101+
}
102+
this.additionalProperties.put(key, value);
103+
return this;
104+
}
105+
106+
/**
107+
* Return the additional (undeclared) property.
108+
*
109+
* @return The additional properties
110+
*/
111+
@JsonAnyGetter
112+
public Map<String, Object> getAdditionalProperties() {
113+
return additionalProperties;
114+
}
115+
116+
/**
117+
* Return the additional (undeclared) property with the specified name.
118+
*
119+
* @param key The arbitrary key to get
120+
* @return The specific additional property for the given key
121+
*/
122+
public Object getAdditionalProperty(String key) {
123+
if (this.additionalProperties == null) {
124+
return null;
125+
}
126+
return this.additionalProperties.get(key);
127+
}
128+
129+
/** Return true if this DeviceTagsBySource object is equal to o. */
130+
@Override
131+
public boolean equals(Object o) {
132+
if (this == o) {
133+
return true;
134+
}
135+
if (o == null || getClass() != o.getClass()) {
136+
return false;
137+
}
138+
DeviceTagsBySource deviceTagsBySource = (DeviceTagsBySource) o;
139+
return Objects.equals(this.source, deviceTagsBySource.source)
140+
&& Objects.equals(this.tags, deviceTagsBySource.tags)
141+
&& Objects.equals(this.additionalProperties, deviceTagsBySource.additionalProperties);
142+
}
143+
144+
@Override
145+
public int hashCode() {
146+
return Objects.hash(source, tags, additionalProperties);
147+
}
148+
149+
@Override
150+
public String toString() {
151+
StringBuilder sb = new StringBuilder();
152+
sb.append("class DeviceTagsBySource {\n");
153+
sb.append(" source: ").append(toIndentedString(source)).append("\n");
154+
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
155+
sb.append(" additionalProperties: ")
156+
.append(toIndentedString(additionalProperties))
157+
.append("\n");
158+
sb.append('}');
159+
return sb.toString();
160+
}
161+
162+
/**
163+
* Convert the given object to string with each line indented by 4 spaces (except the first line).
164+
*/
165+
private String toIndentedString(Object o) {
166+
if (o == null) {
167+
return "null";
168+
}
169+
return o.toString().replace("\n", "\n ");
170+
}
171+
}

src/main/java/com/datadog/api/client/v2/model/ListTagsResponseDataAttributes.java

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,32 @@
1919
import java.util.Objects;
2020

2121
/** The definition of ListTagsResponseDataAttributes object. */
22-
@JsonPropertyOrder({ListTagsResponseDataAttributes.JSON_PROPERTY_TAGS})
22+
@JsonPropertyOrder({
23+
ListTagsResponseDataAttributes.JSON_PROPERTY_BY_SOURCE,
24+
ListTagsResponseDataAttributes.JSON_PROPERTY_TAGS
25+
})
2326
@jakarta.annotation.Generated(
2427
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
2528
public class ListTagsResponseDataAttributes {
2629
@JsonIgnore public boolean unparsed = false;
30+
public static final String JSON_PROPERTY_BY_SOURCE = "by_source";
31+
private List<DeviceTagsBySource> bySource = null;
32+
2733
public static final String JSON_PROPERTY_TAGS = "tags";
2834
private List<String> tags = null;
2935

36+
/**
37+
* The list of device tags grouped by source.
38+
*
39+
* @return bySource
40+
*/
41+
@jakarta.annotation.Nullable
42+
@JsonProperty(JSON_PROPERTY_BY_SOURCE)
43+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
44+
public List<DeviceTagsBySource> getBySource() {
45+
return bySource;
46+
}
47+
3048
public ListTagsResponseDataAttributes tags(List<String> tags) {
3149
this.tags = tags;
3250
return this;
@@ -113,20 +131,22 @@ public boolean equals(Object o) {
113131
}
114132
ListTagsResponseDataAttributes listTagsResponseDataAttributes =
115133
(ListTagsResponseDataAttributes) o;
116-
return Objects.equals(this.tags, listTagsResponseDataAttributes.tags)
134+
return Objects.equals(this.bySource, listTagsResponseDataAttributes.bySource)
135+
&& Objects.equals(this.tags, listTagsResponseDataAttributes.tags)
117136
&& Objects.equals(
118137
this.additionalProperties, listTagsResponseDataAttributes.additionalProperties);
119138
}
120139

121140
@Override
122141
public int hashCode() {
123-
return Objects.hash(tags, additionalProperties);
142+
return Objects.hash(bySource, tags, additionalProperties);
124143
}
125144

126145
@Override
127146
public String toString() {
128147
StringBuilder sb = new StringBuilder();
129148
sb.append("class ListTagsResponseDataAttributes {\n");
149+
sb.append(" bySource: ").append(toIndentedString(bySource)).append("\n");
130150
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
131151
sb.append(" additionalProperties: ")
132152
.append(toIndentedString(additionalProperties))

0 commit comments

Comments
 (0)