diff --git a/.apigentools-info b/.apigentools-info index f39e3aa9dd7..2f2566c8a46 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.5", - "regenerated": "2023-07-26 14:17:56.058712", - "spec_repo_commit": "835cb6df" + "regenerated": "2023-07-26 14:58:34.040724", + "spec_repo_commit": "3d6b3d5a" }, "v2": { "apigentools_version": "1.6.5", - "regenerated": "2023-07-26 14:17:56.072309", - "spec_repo_commit": "835cb6df" + "regenerated": "2023-07-26 14:58:34.059440", + "spec_repo_commit": "3d6b3d5a" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 3fcd775274c..b1c772d8edd 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -10110,6 +10110,8 @@ components: properties: attributes: $ref: '#/components/schemas/OnDemandConcurrencyCapAttributes' + type: + $ref: '#/components/schemas/OnDemandConcurrencyCapType' type: object OnDemandConcurrencyCapAttributes: description: On-demand concurrency cap attributes. @@ -10125,6 +10127,13 @@ components: data: $ref: '#/components/schemas/OnDemandConcurrencyCap' type: object + OnDemandConcurrencyCapType: + description: On-demand concurrency cap type. + enum: + - on_demand_concurrency_cap + type: string + x-enum-varnames: + - ON_DEMAND_CONCURRENCY_CAP OpsgenieServiceCreateAttributes: description: The Opsgenie service attributes for a create request. properties: diff --git a/src/main/java/com/datadog/api/client/v2/model/OnDemandConcurrencyCap.java b/src/main/java/com/datadog/api/client/v2/model/OnDemandConcurrencyCap.java index ae6ae406664..c1657676fb6 100644 --- a/src/main/java/com/datadog/api/client/v2/model/OnDemandConcurrencyCap.java +++ b/src/main/java/com/datadog/api/client/v2/model/OnDemandConcurrencyCap.java @@ -17,7 +17,10 @@ import java.util.Objects; /** On-demand concurrency cap. */ -@JsonPropertyOrder({OnDemandConcurrencyCap.JSON_PROPERTY_ATTRIBUTES}) +@JsonPropertyOrder({ + OnDemandConcurrencyCap.JSON_PROPERTY_ATTRIBUTES, + OnDemandConcurrencyCap.JSON_PROPERTY_TYPE +}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class OnDemandConcurrencyCap { @@ -25,6 +28,9 @@ public class OnDemandConcurrencyCap { public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private OnDemandConcurrencyCapAttributes attributes; + public static final String JSON_PROPERTY_TYPE = "type"; + private OnDemandConcurrencyCapType type; + public OnDemandConcurrencyCap attributes(OnDemandConcurrencyCapAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -47,6 +53,31 @@ public void setAttributes(OnDemandConcurrencyCapAttributes attributes) { this.attributes = attributes; } + public OnDemandConcurrencyCap type(OnDemandConcurrencyCapType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * On-demand concurrency cap type. + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OnDemandConcurrencyCapType getType() { + return type; + } + + public void setType(OnDemandConcurrencyCapType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -104,12 +135,13 @@ public boolean equals(Object o) { } OnDemandConcurrencyCap onDemandConcurrencyCap = (OnDemandConcurrencyCap) o; return Objects.equals(this.attributes, onDemandConcurrencyCap.attributes) + && Objects.equals(this.type, onDemandConcurrencyCap.type) && Objects.equals(this.additionalProperties, onDemandConcurrencyCap.additionalProperties); } @Override public int hashCode() { - return Objects.hash(attributes, additionalProperties); + return Objects.hash(attributes, type, additionalProperties); } @Override @@ -117,6 +149,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OnDemandConcurrencyCap {\n"); sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/OnDemandConcurrencyCapType.java b/src/main/java/com/datadog/api/client/v2/model/OnDemandConcurrencyCapType.java new file mode 100644 index 00000000000..dde111db5bc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OnDemandConcurrencyCapType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** On-demand concurrency cap type. */ +@JsonSerialize(using = OnDemandConcurrencyCapType.OnDemandConcurrencyCapTypeSerializer.class) +public class OnDemandConcurrencyCapType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("on_demand_concurrency_cap")); + + public static final OnDemandConcurrencyCapType ON_DEMAND_CONCURRENCY_CAP = + new OnDemandConcurrencyCapType("on_demand_concurrency_cap"); + + OnDemandConcurrencyCapType(String value) { + super(value, allowedValues); + } + + public static class OnDemandConcurrencyCapTypeSerializer + extends StdSerializer { + public OnDemandConcurrencyCapTypeSerializer(Class t) { + super(t); + } + + public OnDemandConcurrencyCapTypeSerializer() { + this(null); + } + + @Override + public void serialize( + OnDemandConcurrencyCapType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static OnDemandConcurrencyCapType fromValue(String value) { + return new OnDemandConcurrencyCapType(value); + } +}