1919/** Options for configuring a memory buffer by queue length. */
2020@ JsonPropertyOrder ({
2121 ObservabilityPipelineMemoryBufferSizeOptions .JSON_PROPERTY_MAX_EVENTS ,
22- ObservabilityPipelineMemoryBufferSizeOptions .JSON_PROPERTY_TYPE
22+ ObservabilityPipelineMemoryBufferSizeOptions .JSON_PROPERTY_TYPE ,
23+ ObservabilityPipelineMemoryBufferSizeOptions .JSON_PROPERTY_WHEN_FULL
2324})
2425@ jakarta .annotation .Generated (
2526 value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator" )
@@ -32,6 +33,10 @@ public class ObservabilityPipelineMemoryBufferSizeOptions {
3233 private ObservabilityPipelineBufferOptionsMemoryType type =
3334 ObservabilityPipelineBufferOptionsMemoryType .MEMORY ;
3435
36+ public static final String JSON_PROPERTY_WHEN_FULL = "when_full" ;
37+ private ObservabilityPipelineBufferOptionsWhenFull whenFull =
38+ ObservabilityPipelineBufferOptionsWhenFull .BLOCK ;
39+
3540 public ObservabilityPipelineMemoryBufferSizeOptions maxEvents (Long maxEvents ) {
3641 this .maxEvents = maxEvents ;
3742 return this ;
@@ -79,6 +84,32 @@ public void setType(ObservabilityPipelineBufferOptionsMemoryType type) {
7984 this .type = type ;
8085 }
8186
87+ public ObservabilityPipelineMemoryBufferSizeOptions whenFull (
88+ ObservabilityPipelineBufferOptionsWhenFull whenFull ) {
89+ this .whenFull = whenFull ;
90+ this .unparsed |= !whenFull .isValid ();
91+ return this ;
92+ }
93+
94+ /**
95+ * Behavior when the buffer is full (block and stop accepting new events, or drop new events)
96+ *
97+ * @return whenFull
98+ */
99+ @ jakarta .annotation .Nullable
100+ @ JsonProperty (JSON_PROPERTY_WHEN_FULL )
101+ @ JsonInclude (value = JsonInclude .Include .USE_DEFAULTS )
102+ public ObservabilityPipelineBufferOptionsWhenFull getWhenFull () {
103+ return whenFull ;
104+ }
105+
106+ public void setWhenFull (ObservabilityPipelineBufferOptionsWhenFull whenFull ) {
107+ if (!whenFull .isValid ()) {
108+ this .unparsed = true ;
109+ }
110+ this .whenFull = whenFull ;
111+ }
112+
82113 /**
83114 * A container for additional, undeclared properties. This is a holder for any undeclared
84115 * properties as specified with the 'additionalProperties' keyword in the OAS document.
@@ -139,14 +170,15 @@ public boolean equals(Object o) {
139170 (ObservabilityPipelineMemoryBufferSizeOptions ) o ;
140171 return Objects .equals (this .maxEvents , observabilityPipelineMemoryBufferSizeOptions .maxEvents )
141172 && Objects .equals (this .type , observabilityPipelineMemoryBufferSizeOptions .type )
173+ && Objects .equals (this .whenFull , observabilityPipelineMemoryBufferSizeOptions .whenFull )
142174 && Objects .equals (
143175 this .additionalProperties ,
144176 observabilityPipelineMemoryBufferSizeOptions .additionalProperties );
145177 }
146178
147179 @ Override
148180 public int hashCode () {
149- return Objects .hash (maxEvents , type , additionalProperties );
181+ return Objects .hash (maxEvents , type , whenFull , additionalProperties );
150182 }
151183
152184 @ Override
@@ -155,6 +187,7 @@ public String toString() {
155187 sb .append ("class ObservabilityPipelineMemoryBufferSizeOptions {\n " );
156188 sb .append (" maxEvents: " ).append (toIndentedString (maxEvents )).append ("\n " );
157189 sb .append (" type: " ).append (toIndentedString (type )).append ("\n " );
190+ sb .append (" whenFull: " ).append (toIndentedString (whenFull )).append ("\n " );
158191 sb .append (" additionalProperties: " )
159192 .append (toIndentedString (additionalProperties ))
160193 .append ("\n " );
0 commit comments