Skip to content

Commit f908416

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit fbacc98 of spec repo
1 parent 0a72c6c commit f908416

4 files changed

Lines changed: 404 additions & 4 deletions

File tree

.generator/schemas/v1/openapi.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6215,6 +6215,38 @@ components:
62156215
type: string
62166216
x-enum-varnames:
62176217
- DECODER_PROCESSOR
6218+
LogsExcludeAttributeProcessor:
6219+
description: |-
6220+
Use this processor to remove an attribute from a log during processing.
6221+
The processor strips the specified attribute from the log event, which is useful
6222+
when the attribute contains sensitive data or is no longer needed downstream.
6223+
properties:
6224+
attribute_to_exclude:
6225+
description: Name of the log attribute to remove from the log event.
6226+
example: foo
6227+
type: string
6228+
is_enabled:
6229+
default: false
6230+
description: Whether or not the processor is enabled.
6231+
type: boolean
6232+
name:
6233+
description: Name of the processor.
6234+
type: string
6235+
type:
6236+
$ref: "#/components/schemas/LogsExcludeAttributeProcessorType"
6237+
required:
6238+
- type
6239+
- attribute_to_exclude
6240+
type: object
6241+
LogsExcludeAttributeProcessorType:
6242+
default: exclude-attribute
6243+
description: Type of logs exclude attribute processor.
6244+
enum:
6245+
- exclude-attribute
6246+
example: exclude-attribute
6247+
type: string
6248+
x-enum-varnames:
6249+
- EXCLUDE_ATTRIBUTE
62186250
LogsExclusion:
62196251
description: Represents the index exclusion filter object from configuration API.
62206252
properties:
@@ -6822,6 +6854,7 @@ components:
68226854
- $ref: "#/components/schemas/LogsArrayProcessor"
68236855
- $ref: "#/components/schemas/LogsDecoderProcessor"
68246856
- $ref: "#/components/schemas/LogsSchemaProcessor"
6857+
- $ref: "#/components/schemas/LogsExcludeAttributeProcessor"
68256858
LogsQueryCompute:
68266859
description: Define computation for a log query.
68276860
properties:
Lines changed: 240 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,240 @@
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.JsonCreator;
12+
import com.fasterxml.jackson.annotation.JsonIgnore;
13+
import com.fasterxml.jackson.annotation.JsonInclude;
14+
import com.fasterxml.jackson.annotation.JsonProperty;
15+
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
16+
import java.util.HashMap;
17+
import java.util.Map;
18+
import java.util.Objects;
19+
20+
/**
21+
* Use this processor to remove an attribute from a log during processing. The processor strips the
22+
* specified attribute from the log event, which is useful when the attribute contains sensitive
23+
* data or is no longer needed downstream.
24+
*/
25+
@JsonPropertyOrder({
26+
LogsExcludeAttributeProcessor.JSON_PROPERTY_ATTRIBUTE_TO_EXCLUDE,
27+
LogsExcludeAttributeProcessor.JSON_PROPERTY_IS_ENABLED,
28+
LogsExcludeAttributeProcessor.JSON_PROPERTY_NAME,
29+
LogsExcludeAttributeProcessor.JSON_PROPERTY_TYPE
30+
})
31+
@jakarta.annotation.Generated(
32+
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
33+
public class LogsExcludeAttributeProcessor {
34+
@JsonIgnore public boolean unparsed = false;
35+
public static final String JSON_PROPERTY_ATTRIBUTE_TO_EXCLUDE = "attribute_to_exclude";
36+
private String attributeToExclude;
37+
38+
public static final String JSON_PROPERTY_IS_ENABLED = "is_enabled";
39+
private Boolean isEnabled = false;
40+
41+
public static final String JSON_PROPERTY_NAME = "name";
42+
private String name;
43+
44+
public static final String JSON_PROPERTY_TYPE = "type";
45+
private LogsExcludeAttributeProcessorType type =
46+
LogsExcludeAttributeProcessorType.EXCLUDE_ATTRIBUTE;
47+
48+
public LogsExcludeAttributeProcessor() {}
49+
50+
@JsonCreator
51+
public LogsExcludeAttributeProcessor(
52+
@JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTE_TO_EXCLUDE)
53+
String attributeToExclude,
54+
@JsonProperty(required = true, value = JSON_PROPERTY_TYPE)
55+
LogsExcludeAttributeProcessorType type) {
56+
this.attributeToExclude = attributeToExclude;
57+
this.type = type;
58+
this.unparsed |= !type.isValid();
59+
}
60+
61+
public LogsExcludeAttributeProcessor attributeToExclude(String attributeToExclude) {
62+
this.attributeToExclude = attributeToExclude;
63+
return this;
64+
}
65+
66+
/**
67+
* Name of the log attribute to remove from the log event.
68+
*
69+
* @return attributeToExclude
70+
*/
71+
@JsonProperty(JSON_PROPERTY_ATTRIBUTE_TO_EXCLUDE)
72+
@JsonInclude(value = JsonInclude.Include.ALWAYS)
73+
public String getAttributeToExclude() {
74+
return attributeToExclude;
75+
}
76+
77+
public void setAttributeToExclude(String attributeToExclude) {
78+
this.attributeToExclude = attributeToExclude;
79+
}
80+
81+
public LogsExcludeAttributeProcessor isEnabled(Boolean isEnabled) {
82+
this.isEnabled = isEnabled;
83+
return this;
84+
}
85+
86+
/**
87+
* Whether or not the processor is enabled.
88+
*
89+
* @return isEnabled
90+
*/
91+
@jakarta.annotation.Nullable
92+
@JsonProperty(JSON_PROPERTY_IS_ENABLED)
93+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
94+
public Boolean getIsEnabled() {
95+
return isEnabled;
96+
}
97+
98+
public void setIsEnabled(Boolean isEnabled) {
99+
this.isEnabled = isEnabled;
100+
}
101+
102+
public LogsExcludeAttributeProcessor name(String name) {
103+
this.name = name;
104+
return this;
105+
}
106+
107+
/**
108+
* Name of the processor.
109+
*
110+
* @return name
111+
*/
112+
@jakarta.annotation.Nullable
113+
@JsonProperty(JSON_PROPERTY_NAME)
114+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
115+
public String getName() {
116+
return name;
117+
}
118+
119+
public void setName(String name) {
120+
this.name = name;
121+
}
122+
123+
public LogsExcludeAttributeProcessor type(LogsExcludeAttributeProcessorType type) {
124+
this.type = type;
125+
this.unparsed |= !type.isValid();
126+
return this;
127+
}
128+
129+
/**
130+
* Type of logs exclude attribute processor.
131+
*
132+
* @return type
133+
*/
134+
@JsonProperty(JSON_PROPERTY_TYPE)
135+
@JsonInclude(value = JsonInclude.Include.ALWAYS)
136+
public LogsExcludeAttributeProcessorType getType() {
137+
return type;
138+
}
139+
140+
public void setType(LogsExcludeAttributeProcessorType type) {
141+
if (!type.isValid()) {
142+
this.unparsed = true;
143+
}
144+
this.type = type;
145+
}
146+
147+
/**
148+
* A container for additional, undeclared properties. This is a holder for any undeclared
149+
* properties as specified with the 'additionalProperties' keyword in the OAS document.
150+
*/
151+
private Map<String, Object> additionalProperties;
152+
153+
/**
154+
* Set the additional (undeclared) property with the specified name and value. If the property
155+
* does not already exist, create it otherwise replace it.
156+
*
157+
* @param key The arbitrary key to set
158+
* @param value The associated value
159+
* @return LogsExcludeAttributeProcessor
160+
*/
161+
@JsonAnySetter
162+
public LogsExcludeAttributeProcessor putAdditionalProperty(String key, Object value) {
163+
if (this.additionalProperties == null) {
164+
this.additionalProperties = new HashMap<String, Object>();
165+
}
166+
this.additionalProperties.put(key, value);
167+
return this;
168+
}
169+
170+
/**
171+
* Return the additional (undeclared) property.
172+
*
173+
* @return The additional properties
174+
*/
175+
@JsonAnyGetter
176+
public Map<String, Object> getAdditionalProperties() {
177+
return additionalProperties;
178+
}
179+
180+
/**
181+
* Return the additional (undeclared) property with the specified name.
182+
*
183+
* @param key The arbitrary key to get
184+
* @return The specific additional property for the given key
185+
*/
186+
public Object getAdditionalProperty(String key) {
187+
if (this.additionalProperties == null) {
188+
return null;
189+
}
190+
return this.additionalProperties.get(key);
191+
}
192+
193+
/** Return true if this LogsExcludeAttributeProcessor object is equal to o. */
194+
@Override
195+
public boolean equals(Object o) {
196+
if (this == o) {
197+
return true;
198+
}
199+
if (o == null || getClass() != o.getClass()) {
200+
return false;
201+
}
202+
LogsExcludeAttributeProcessor logsExcludeAttributeProcessor = (LogsExcludeAttributeProcessor) o;
203+
return Objects.equals(this.attributeToExclude, logsExcludeAttributeProcessor.attributeToExclude)
204+
&& Objects.equals(this.isEnabled, logsExcludeAttributeProcessor.isEnabled)
205+
&& Objects.equals(this.name, logsExcludeAttributeProcessor.name)
206+
&& Objects.equals(this.type, logsExcludeAttributeProcessor.type)
207+
&& Objects.equals(
208+
this.additionalProperties, logsExcludeAttributeProcessor.additionalProperties);
209+
}
210+
211+
@Override
212+
public int hashCode() {
213+
return Objects.hash(attributeToExclude, isEnabled, name, type, additionalProperties);
214+
}
215+
216+
@Override
217+
public String toString() {
218+
StringBuilder sb = new StringBuilder();
219+
sb.append("class LogsExcludeAttributeProcessor {\n");
220+
sb.append(" attributeToExclude: ").append(toIndentedString(attributeToExclude)).append("\n");
221+
sb.append(" isEnabled: ").append(toIndentedString(isEnabled)).append("\n");
222+
sb.append(" name: ").append(toIndentedString(name)).append("\n");
223+
sb.append(" type: ").append(toIndentedString(type)).append("\n");
224+
sb.append(" additionalProperties: ")
225+
.append(toIndentedString(additionalProperties))
226+
.append("\n");
227+
sb.append('}');
228+
return sb.toString();
229+
}
230+
231+
/**
232+
* Convert the given object to string with each line indented by 4 spaces (except the first line).
233+
*/
234+
private String toIndentedString(Object o) {
235+
if (o == null) {
236+
return "null";
237+
}
238+
return o.toString().replace("\n", "\n ");
239+
}
240+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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.datadog.api.client.ModelEnum;
10+
import com.fasterxml.jackson.annotation.JsonCreator;
11+
import com.fasterxml.jackson.core.JsonGenerator;
12+
import com.fasterxml.jackson.core.JsonProcessingException;
13+
import com.fasterxml.jackson.databind.SerializerProvider;
14+
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
15+
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
16+
import java.io.IOException;
17+
import java.util.Arrays;
18+
import java.util.HashSet;
19+
import java.util.Set;
20+
21+
/** Type of logs exclude attribute processor. */
22+
@JsonSerialize(
23+
using = LogsExcludeAttributeProcessorType.LogsExcludeAttributeProcessorTypeSerializer.class)
24+
public class LogsExcludeAttributeProcessorType extends ModelEnum<String> {
25+
26+
private static final Set<String> allowedValues =
27+
new HashSet<String>(Arrays.asList("exclude-attribute"));
28+
29+
public static final LogsExcludeAttributeProcessorType EXCLUDE_ATTRIBUTE =
30+
new LogsExcludeAttributeProcessorType("exclude-attribute");
31+
32+
LogsExcludeAttributeProcessorType(String value) {
33+
super(value, allowedValues);
34+
}
35+
36+
public static class LogsExcludeAttributeProcessorTypeSerializer
37+
extends StdSerializer<LogsExcludeAttributeProcessorType> {
38+
public LogsExcludeAttributeProcessorTypeSerializer(Class<LogsExcludeAttributeProcessorType> t) {
39+
super(t);
40+
}
41+
42+
public LogsExcludeAttributeProcessorTypeSerializer() {
43+
this(null);
44+
}
45+
46+
@Override
47+
public void serialize(
48+
LogsExcludeAttributeProcessorType value, JsonGenerator jgen, SerializerProvider provider)
49+
throws IOException, JsonProcessingException {
50+
jgen.writeObject(value.value);
51+
}
52+
}
53+
54+
@JsonCreator
55+
public static LogsExcludeAttributeProcessorType fromValue(String value) {
56+
return new LogsExcludeAttributeProcessorType(value);
57+
}
58+
}

0 commit comments

Comments
 (0)