Skip to content
Open
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
1,322 changes: 1,176 additions & 146 deletions .generator/schemas/v1/openapi.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46179,7 +46179,7 @@ components:
$ref: "#/components/schemas/ObservabilityPipelineParseGrokProcessorRuleMatchRule"
type: array
source:
description: The value of the source field in log events to be processed by the Grok rules.
description: The name of the field in the log event to apply the Grok rules to.
example: "message"
type: string
support_rules:
Expand Down
177 changes: 177 additions & 0 deletions src/main/java/com/datadog/api/client/v1/model/CalendarInterval.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
/*
* 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.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.Objects;

/** Calendar interval definition. */
@JsonPropertyOrder({
CalendarInterval.JSON_PROPERTY_ALIGNMENT,
CalendarInterval.JSON_PROPERTY_QUANTITY,
CalendarInterval.JSON_PROPERTY_TIMEZONE,
CalendarInterval.JSON_PROPERTY_TYPE
})
@jakarta.annotation.Generated(
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
public class CalendarInterval {
@JsonIgnore public boolean unparsed = false;
public static final String JSON_PROPERTY_ALIGNMENT = "alignment";
private String alignment;

public static final String JSON_PROPERTY_QUANTITY = "quantity";
private Long quantity;

public static final String JSON_PROPERTY_TIMEZONE = "timezone";
private String timezone;

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

public CalendarInterval() {}

@JsonCreator
public CalendarInterval(
@JsonProperty(required = true, value = JSON_PROPERTY_TYPE) CalendarIntervalType type) {
this.type = type;
this.unparsed |= !type.isValid();
}

public CalendarInterval alignment(String alignment) {
this.alignment = alignment;
return this;
}

/**
* Alignment of the interval.
*
* @return alignment
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ALIGNMENT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getAlignment() {
return alignment;
}

public void setAlignment(String alignment) {
this.alignment = alignment;
}

public CalendarInterval quantity(Long quantity) {
this.quantity = quantity;
return this;
}

/**
* Quantity of the interval.
*
* @return quantity
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_QUANTITY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getQuantity() {
return quantity;
}

public void setQuantity(Long quantity) {
this.quantity = quantity;
}

public CalendarInterval timezone(String timezone) {
this.timezone = timezone;
return this;
}

/**
* Timezone for the interval.
*
* @return timezone
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_TIMEZONE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getTimezone() {
return timezone;
}

public void setTimezone(String timezone) {
this.timezone = timezone;
}

public CalendarInterval type(CalendarIntervalType type) {
this.type = type;
this.unparsed |= !type.isValid();
return this;
}

/**
* Type of calendar interval.
*
* @return type
*/
@JsonProperty(JSON_PROPERTY_TYPE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public CalendarIntervalType getType() {
return type;
}

public void setType(CalendarIntervalType type) {
if (!type.isValid()) {
this.unparsed = true;
}
this.type = type;
}

/** Return true if this CalendarInterval object is equal to o. */
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CalendarInterval calendarInterval = (CalendarInterval) o;
return Objects.equals(this.alignment, calendarInterval.alignment)
&& Objects.equals(this.quantity, calendarInterval.quantity)
&& Objects.equals(this.timezone, calendarInterval.timezone)
&& Objects.equals(this.type, calendarInterval.type);
}

@Override
public int hashCode() {
return Objects.hash(alignment, quantity, timezone, type);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CalendarInterval {\n");
sb.append(" alignment: ").append(toIndentedString(alignment)).append("\n");
sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n");
sb.append(" timezone: ").append(toIndentedString(timezone)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).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,62 @@
/*
* 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;

/** Type of calendar interval. */
@JsonSerialize(using = CalendarIntervalType.CalendarIntervalTypeSerializer.class)
public class CalendarIntervalType extends ModelEnum<String> {

private static final Set<String> allowedValues =
new HashSet<String>(
Arrays.asList("day", "week", "month", "year", "quarter", "minute", "hour"));

public static final CalendarIntervalType DAY = new CalendarIntervalType("day");
public static final CalendarIntervalType WEEK = new CalendarIntervalType("week");
public static final CalendarIntervalType MONTH = new CalendarIntervalType("month");
public static final CalendarIntervalType YEAR = new CalendarIntervalType("year");
public static final CalendarIntervalType QUARTER = new CalendarIntervalType("quarter");
public static final CalendarIntervalType MINUTE = new CalendarIntervalType("minute");
public static final CalendarIntervalType HOUR = new CalendarIntervalType("hour");

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

public static class CalendarIntervalTypeSerializer extends StdSerializer<CalendarIntervalType> {
public CalendarIntervalTypeSerializer(Class<CalendarIntervalType> t) {
super(t);
}

public CalendarIntervalTypeSerializer() {
this(null);
}

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

@JsonCreator
public static CalendarIntervalType fromValue(String value) {
return new CalendarIntervalType(value);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*
* 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;

/** Display mode for legacy cohort queries. */
@JsonSerialize(using = CohortLegacyDisplayMode.CohortLegacyDisplayModeSerializer.class)
public class CohortLegacyDisplayMode extends ModelEnum<String> {

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

public static final CohortLegacyDisplayMode ABSOLUTE = new CohortLegacyDisplayMode("absolute");
public static final CohortLegacyDisplayMode PERCENTAGE =
new CohortLegacyDisplayMode("percentage");

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

public static class CohortLegacyDisplayModeSerializer
extends StdSerializer<CohortLegacyDisplayMode> {
public CohortLegacyDisplayModeSerializer(Class<CohortLegacyDisplayMode> t) {
super(t);
}

public CohortLegacyDisplayModeSerializer() {
this(null);
}

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

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