Skip to content

Commit 3df60a4

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add global IP ranges to spec (#1680)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent c36bd25 commit 3df60a4

File tree

4 files changed

+233
-4
lines changed

4 files changed

+233
-4
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.6.6",
7-
"regenerated": "2023-10-12 16:54:29.199218",
8-
"spec_repo_commit": "a04c27c5"
7+
"regenerated": "2023-10-12 17:29:40.745280",
8+
"spec_repo_commit": "201be608"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2023-10-12 16:54:29.217069",
13-
"spec_repo_commit": "a04c27c5"
12+
"regenerated": "2023-10-12 17:29:40.763182",
13+
"spec_repo_commit": "201be608"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4045,6 +4045,22 @@ components:
40454045
type: string
40464046
type: array
40474047
type: object
4048+
IPPrefixesGlobal:
4049+
description: Available prefix information for all Datadog endpoints.
4050+
properties:
4051+
prefixes_ipv4:
4052+
description: List of IPv4 prefixes.
4053+
items:
4054+
description: IPv4 prefix
4055+
type: string
4056+
type: array
4057+
prefixes_ipv6:
4058+
description: List of IPv6 prefixes.
4059+
items:
4060+
description: IPv6 prefix
4061+
type: string
4062+
type: array
4063+
type: object
40484064
IPPrefixesLogs:
40494065
description: Available prefix information for the Logs endpoints.
40504066
properties:
@@ -4185,6 +4201,8 @@ components:
41854201
$ref: '#/components/schemas/IPPrefixesAPI'
41864202
apm:
41874203
$ref: '#/components/schemas/IPPrefixesAPM'
4204+
global:
4205+
$ref: '#/components/schemas/IPPrefixesGlobal'
41884206
logs:
41894207
$ref: '#/components/schemas/IPPrefixesLogs'
41904208
modified:
Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
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.v1.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+
/** Available prefix information for all Datadog endpoints. */
22+
@JsonPropertyOrder({
23+
IPPrefixesGlobal.JSON_PROPERTY_PREFIXES_IPV4,
24+
IPPrefixesGlobal.JSON_PROPERTY_PREFIXES_IPV6
25+
})
26+
@jakarta.annotation.Generated(
27+
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
28+
public class IPPrefixesGlobal {
29+
@JsonIgnore public boolean unparsed = false;
30+
public static final String JSON_PROPERTY_PREFIXES_IPV4 = "prefixes_ipv4";
31+
private List<String> prefixesIpv4 = null;
32+
33+
public static final String JSON_PROPERTY_PREFIXES_IPV6 = "prefixes_ipv6";
34+
private List<String> prefixesIpv6 = null;
35+
36+
public IPPrefixesGlobal prefixesIpv4(List<String> prefixesIpv4) {
37+
this.prefixesIpv4 = prefixesIpv4;
38+
return this;
39+
}
40+
41+
public IPPrefixesGlobal addPrefixesIpv4Item(String prefixesIpv4Item) {
42+
if (this.prefixesIpv4 == null) {
43+
this.prefixesIpv4 = new ArrayList<>();
44+
}
45+
this.prefixesIpv4.add(prefixesIpv4Item);
46+
return this;
47+
}
48+
49+
/**
50+
* List of IPv4 prefixes.
51+
*
52+
* @return prefixesIpv4
53+
*/
54+
@jakarta.annotation.Nullable
55+
@JsonProperty(JSON_PROPERTY_PREFIXES_IPV4)
56+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
57+
public List<String> getPrefixesIpv4() {
58+
return prefixesIpv4;
59+
}
60+
61+
public void setPrefixesIpv4(List<String> prefixesIpv4) {
62+
this.prefixesIpv4 = prefixesIpv4;
63+
}
64+
65+
public IPPrefixesGlobal prefixesIpv6(List<String> prefixesIpv6) {
66+
this.prefixesIpv6 = prefixesIpv6;
67+
return this;
68+
}
69+
70+
public IPPrefixesGlobal addPrefixesIpv6Item(String prefixesIpv6Item) {
71+
if (this.prefixesIpv6 == null) {
72+
this.prefixesIpv6 = new ArrayList<>();
73+
}
74+
this.prefixesIpv6.add(prefixesIpv6Item);
75+
return this;
76+
}
77+
78+
/**
79+
* List of IPv6 prefixes.
80+
*
81+
* @return prefixesIpv6
82+
*/
83+
@jakarta.annotation.Nullable
84+
@JsonProperty(JSON_PROPERTY_PREFIXES_IPV6)
85+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
86+
public List<String> getPrefixesIpv6() {
87+
return prefixesIpv6;
88+
}
89+
90+
public void setPrefixesIpv6(List<String> prefixesIpv6) {
91+
this.prefixesIpv6 = prefixesIpv6;
92+
}
93+
94+
/**
95+
* A container for additional, undeclared properties. This is a holder for any undeclared
96+
* properties as specified with the 'additionalProperties' keyword in the OAS document.
97+
*/
98+
private Map<String, Object> additionalProperties;
99+
100+
/**
101+
* Set the additional (undeclared) property with the specified name and value. If the property
102+
* does not already exist, create it otherwise replace it.
103+
*
104+
* @param key The arbitrary key to set
105+
* @param value The associated value
106+
* @return IPPrefixesGlobal
107+
*/
108+
@JsonAnySetter
109+
public IPPrefixesGlobal putAdditionalProperty(String key, Object value) {
110+
if (this.additionalProperties == null) {
111+
this.additionalProperties = new HashMap<String, Object>();
112+
}
113+
this.additionalProperties.put(key, value);
114+
return this;
115+
}
116+
117+
/**
118+
* Return the additional (undeclared) property.
119+
*
120+
* @return The additional properties
121+
*/
122+
@JsonAnyGetter
123+
public Map<String, Object> getAdditionalProperties() {
124+
return additionalProperties;
125+
}
126+
127+
/**
128+
* Return the additional (undeclared) property with the specified name.
129+
*
130+
* @param key The arbitrary key to get
131+
* @return The specific additional property for the given key
132+
*/
133+
public Object getAdditionalProperty(String key) {
134+
if (this.additionalProperties == null) {
135+
return null;
136+
}
137+
return this.additionalProperties.get(key);
138+
}
139+
140+
/** Return true if this IPPrefixesGlobal object is equal to o. */
141+
@Override
142+
public boolean equals(Object o) {
143+
if (this == o) {
144+
return true;
145+
}
146+
if (o == null || getClass() != o.getClass()) {
147+
return false;
148+
}
149+
IPPrefixesGlobal ipPrefixesGlobal = (IPPrefixesGlobal) o;
150+
return Objects.equals(this.prefixesIpv4, ipPrefixesGlobal.prefixesIpv4)
151+
&& Objects.equals(this.prefixesIpv6, ipPrefixesGlobal.prefixesIpv6)
152+
&& Objects.equals(this.additionalProperties, ipPrefixesGlobal.additionalProperties);
153+
}
154+
155+
@Override
156+
public int hashCode() {
157+
return Objects.hash(prefixesIpv4, prefixesIpv6, additionalProperties);
158+
}
159+
160+
@Override
161+
public String toString() {
162+
StringBuilder sb = new StringBuilder();
163+
sb.append("class IPPrefixesGlobal {\n");
164+
sb.append(" prefixesIpv4: ").append(toIndentedString(prefixesIpv4)).append("\n");
165+
sb.append(" prefixesIpv6: ").append(toIndentedString(prefixesIpv6)).append("\n");
166+
sb.append(" additionalProperties: ")
167+
.append(toIndentedString(additionalProperties))
168+
.append("\n");
169+
sb.append("}");
170+
return sb.toString();
171+
}
172+
173+
/**
174+
* Convert the given object to string with each line indented by 4 spaces (except the first line).
175+
*/
176+
private String toIndentedString(Object o) {
177+
if (o == null) {
178+
return "null";
179+
}
180+
return o.toString().replace("\n", "\n ");
181+
}
182+
}

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

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
IPRanges.JSON_PROPERTY_AGENTS,
2222
IPRanges.JSON_PROPERTY_API,
2323
IPRanges.JSON_PROPERTY_APM,
24+
IPRanges.JSON_PROPERTY_GLOBAL,
2425
IPRanges.JSON_PROPERTY_LOGS,
2526
IPRanges.JSON_PROPERTY_MODIFIED,
2627
IPRanges.JSON_PROPERTY_ORCHESTRATOR,
@@ -44,6 +45,9 @@ public class IPRanges {
4445
public static final String JSON_PROPERTY_APM = "apm";
4546
private IPPrefixesAPM apm;
4647

48+
public static final String JSON_PROPERTY_GLOBAL = "global";
49+
private IPPrefixesGlobal global;
50+
4751
public static final String JSON_PROPERTY_LOGS = "logs";
4852
private IPPrefixesLogs logs;
4953

@@ -138,6 +142,28 @@ public void setApm(IPPrefixesAPM apm) {
138142
this.apm = apm;
139143
}
140144

145+
public IPRanges global(IPPrefixesGlobal global) {
146+
this.global = global;
147+
this.unparsed |= global.unparsed;
148+
return this;
149+
}
150+
151+
/**
152+
* Available prefix information for all Datadog endpoints.
153+
*
154+
* @return global
155+
*/
156+
@jakarta.annotation.Nullable
157+
@JsonProperty(JSON_PROPERTY_GLOBAL)
158+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
159+
public IPPrefixesGlobal getGlobal() {
160+
return global;
161+
}
162+
163+
public void setGlobal(IPPrefixesGlobal global) {
164+
this.global = global;
165+
}
166+
141167
public IPRanges logs(IPPrefixesLogs logs) {
142168
this.logs = logs;
143169
this.unparsed |= logs.unparsed;
@@ -395,6 +421,7 @@ public boolean equals(Object o) {
395421
return Objects.equals(this.agents, ipRanges.agents)
396422
&& Objects.equals(this.api, ipRanges.api)
397423
&& Objects.equals(this.apm, ipRanges.apm)
424+
&& Objects.equals(this.global, ipRanges.global)
398425
&& Objects.equals(this.logs, ipRanges.logs)
399426
&& Objects.equals(this.modified, ipRanges.modified)
400427
&& Objects.equals(this.orchestrator, ipRanges.orchestrator)
@@ -413,6 +440,7 @@ public int hashCode() {
413440
agents,
414441
api,
415442
apm,
443+
global,
416444
logs,
417445
modified,
418446
orchestrator,
@@ -432,6 +460,7 @@ public String toString() {
432460
sb.append(" agents: ").append(toIndentedString(agents)).append("\n");
433461
sb.append(" api: ").append(toIndentedString(api)).append("\n");
434462
sb.append(" apm: ").append(toIndentedString(apm)).append("\n");
463+
sb.append(" global: ").append(toIndentedString(global)).append("\n");
435464
sb.append(" logs: ").append(toIndentedString(logs)).append("\n");
436465
sb.append(" modified: ").append(toIndentedString(modified)).append("\n");
437466
sb.append(" orchestrator: ").append(toIndentedString(orchestrator)).append("\n");

0 commit comments

Comments
 (0)