Skip to content
Closed
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.6",
"regenerated": "2025-02-14 15:03:35.352599",
"spec_repo_commit": "a739b49f"
"regenerated": "2025-02-17 08:39:26.763726",
"spec_repo_commit": "08213d1b"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-02-14 15:03:35.368038",
"spec_repo_commit": "a739b49f"
"regenerated": "2025-02-17 08:39:26.778770",
"spec_repo_commit": "08213d1b"
}
}
}
57 changes: 57 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1115,6 +1115,61 @@ components:
type: string
x-enum-varnames:
- CHECK_STATUS
ColumnOrderObject:
description: Order criteria
properties:
index:
description: Index of the sorted column
format: double
type: number
name:
description: Name of the sorted column
type: string
order:
$ref: '#/components/schemas/ColumnOrderObjectOrder'
description: Order of the sort
type:
$ref: '#/components/schemas/ColumnOrderObjectType'
description: Type of sorted attribute
required:
- order
- type
type: object
ColumnOrderObjectOrder:
description: Order object
enum:
- asc
- desc
example: asc
type: string
x-enum-varnames:
- ASC
- DESC
ColumnOrderObjectType:
description: type of column
enum:
- formula
- group
example: formula
type: string
x-enum-varnames:
- FORMULA
- GROUP
ColumnSortObject:
description: Sort object
properties:
count:
description: Limit number of items displayed
format: double
type: number
order_by:
description: Order criteria
items:
$ref: '#/components/schemas/ColumnOrderObject'
maxItems: 1
minItems: 1
type: array
type: object
ContentEncoding:
description: HTTP header used to compress the media-type.
enum:
Expand Down Expand Up @@ -10223,6 +10278,8 @@ components:
$ref: '#/components/schemas/LogQueryDefinition'
security_query:
$ref: '#/components/schemas/LogQueryDefinition'
sort:
$ref: '#/components/schemas/ColumnSortObject'
type: object
ReferenceTableLogsLookupProcessor:
description: '**Note**: Reference Tables are in public beta.
Expand Down
237 changes: 237 additions & 0 deletions src/main/java/com/datadog/api/client/v1/model/ColumnOrderObject.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,237 @@
/*
* 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.v1.model;

import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

/** Order criteria */
@JsonPropertyOrder({
ColumnOrderObject.JSON_PROPERTY_INDEX,
ColumnOrderObject.JSON_PROPERTY_NAME,
ColumnOrderObject.JSON_PROPERTY_ORDER,
ColumnOrderObject.JSON_PROPERTY_TYPE
})
@jakarta.annotation.Generated(
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
public class ColumnOrderObject {
@JsonIgnore public boolean unparsed = false;
public static final String JSON_PROPERTY_INDEX = "index";
private Double index;

public static final String JSON_PROPERTY_NAME = "name";
private String name;

public static final String JSON_PROPERTY_ORDER = "order";
private ColumnOrderObjectOrder order;

public static final String JSON_PROPERTY_TYPE = "type";
private ColumnOrderObjectType type;

public ColumnOrderObject() {}

@JsonCreator
public ColumnOrderObject(
@JsonProperty(required = true, value = JSON_PROPERTY_ORDER) ColumnOrderObjectOrder order,
@JsonProperty(required = true, value = JSON_PROPERTY_TYPE) ColumnOrderObjectType type) {
this.order = order;
this.unparsed |= !order.isValid();
this.type = type;
this.unparsed |= !type.isValid();
}

public ColumnOrderObject index(Double index) {
this.index = index;
return this;
}

/**
* Index of the sorted column
*
* @return index
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_INDEX)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Double getIndex() {
return index;
}

public void setIndex(Double index) {
this.index = index;
}

public ColumnOrderObject name(String name) {
this.name = name;
return this;
}

/**
* Name of the sorted column
*
* @return name
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public ColumnOrderObject order(ColumnOrderObjectOrder order) {
this.order = order;
this.unparsed |= !order.isValid();
return this;
}

/**
* Order object
*
* @return order
*/
@JsonProperty(JSON_PROPERTY_ORDER)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public ColumnOrderObjectOrder getOrder() {
return order;
}

public void setOrder(ColumnOrderObjectOrder order) {
if (!order.isValid()) {
this.unparsed = true;
}
this.order = order;
}

public ColumnOrderObject type(ColumnOrderObjectType type) {
this.type = type;
this.unparsed |= !type.isValid();
return this;
}

/**
* type of column
*
* @return type
*/
@JsonProperty(JSON_PROPERTY_TYPE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public ColumnOrderObjectType getType() {
return type;
}

public void setType(ColumnOrderObjectType 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.
*/
private Map<String, Object> additionalProperties;

/**
* Set the additional (undeclared) property with the specified name and value. If the property
* does not already exist, create it otherwise replace it.
*
* @param key The arbitrary key to set
* @param value The associated value
* @return ColumnOrderObject
*/
@JsonAnySetter
public ColumnOrderObject putAdditionalProperty(String key, Object value) {
if (this.additionalProperties == null) {
this.additionalProperties = new HashMap<String, Object>();
}
this.additionalProperties.put(key, value);
return this;
}

/**
* Return the additional (undeclared) property.
*
* @return The additional properties
*/
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
return additionalProperties;
}

/**
* Return the additional (undeclared) property with the specified name.
*
* @param key The arbitrary key to get
* @return The specific additional property for the given key
*/
public Object getAdditionalProperty(String key) {
if (this.additionalProperties == null) {
return null;
}
return this.additionalProperties.get(key);
}

/** Return true if this ColumnOrderObject object is equal to o. */
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ColumnOrderObject columnOrderObject = (ColumnOrderObject) o;
return Objects.equals(this.index, columnOrderObject.index)
&& Objects.equals(this.name, columnOrderObject.name)
&& Objects.equals(this.order, columnOrderObject.order)
&& Objects.equals(this.type, columnOrderObject.type)
&& Objects.equals(this.additionalProperties, columnOrderObject.additionalProperties);
}

@Override
public int hashCode() {
return Objects.hash(index, name, order, type, additionalProperties);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ColumnOrderObject {\n");
sb.append(" index: ").append(toIndentedString(index)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" order: ").append(toIndentedString(order)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" additionalProperties: ")
.append(toIndentedString(additionalProperties))
.append("\n");
sb.append('}');
return sb.toString();
}

/**
* Convert the given object to string with each line indented by 4 spaces (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
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.v1.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;

/** Order object */
@JsonSerialize(using = ColumnOrderObjectOrder.ColumnOrderObjectOrderSerializer.class)
public class ColumnOrderObjectOrder extends ModelEnum<String> {

private static final Set<String> allowedValues =
new HashSet<String>(Arrays.asList("asc", "desc"));

public static final ColumnOrderObjectOrder ASC = new ColumnOrderObjectOrder("asc");
public static final ColumnOrderObjectOrder DESC = new ColumnOrderObjectOrder("desc");

ColumnOrderObjectOrder(String value) {
super(value, allowedValues);
}

public static class ColumnOrderObjectOrderSerializer
extends StdSerializer<ColumnOrderObjectOrder> {
public ColumnOrderObjectOrderSerializer(Class<ColumnOrderObjectOrder> t) {
super(t);
}

public ColumnOrderObjectOrderSerializer() {
this(null);
}

@Override
public void serialize(
ColumnOrderObjectOrder value, JsonGenerator jgen, SerializerProvider provider)
throws IOException, JsonProcessingException {
jgen.writeObject(value.value);
}
}

@JsonCreator
public static ColumnOrderObjectOrder fromValue(String value) {
return new ColumnOrderObjectOrder(value);
}
}
Loading