Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
9 changes: 9 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,20 @@
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 {
@JsonIgnore public boolean unparsed = false;
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;
Expand All @@ -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.
Expand Down Expand Up @@ -104,19 +135,21 @@ 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
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");
Expand Down
Original file line number Diff line number Diff line change
@@ -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<String> {

private static final Set<String> allowedValues =
new HashSet<String>(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<OnDemandConcurrencyCapType> {
public OnDemandConcurrencyCapTypeSerializer(Class<OnDemandConcurrencyCapType> 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);
}
}