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
43 changes: 43 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27920,6 +27920,42 @@ components:
WidgetBackgroundColor:
description: "Background color of the widget. Supported values are `white`, `blue`, `purple`, `pink`, `orange`, `yellow`, `green`, `gray`, `vivid_blue`, `vivid_purple`, `vivid_pink`, `vivid_orange`, `vivid_yellow`, `vivid_green`, and `transparent`."
type: string
WidgetCalendarAlignedSpan:
description: Used for calendar-aligned time spans, such as the current month or previous year.
properties:
hide_incomplete_cost_data:
description: Whether to hide incomplete cost data in the widget.
type: boolean
offset:
description: Number of completed periods before the current period. 0 represents the current period.
example: 1
format: int64
minimum: 0
type: integer
timezone:
description: Time zone used to align the calendar period.
example: UTC
type: string
type:
$ref: "#/components/schemas/WidgetCalendarAlignedSpanType"
required:
- type
- offset
type: object
WidgetCalendarAlignedSpanType:
description: Calendar-aligned time span type.
enum:
- daily
- weekly
- monthly
- yearly
example: daily
type: string
x-enum-varnames:
- DAILY
- WEEKLY
- MONTHLY
- YEARLY
WidgetChangeType:
description: Show the absolute or the relative change.
enum:
Expand Down Expand Up @@ -28381,6 +28417,9 @@ components:
- month_to_date
- 1y
- alert
- full_week
- full_month
- year_to_date
example: 5m
type: string
x-enum-varnames:
Expand All @@ -28401,6 +28440,9 @@ components:
- MONTH_TO_DATE
- PAST_ONE_YEAR
- ALERT
- FULL_WEEK
- FULL_MONTH
- YEAR_TO_DATE
WidgetLiveSpanUnit:
description: Unit of the time span.
enum:
Expand Down Expand Up @@ -28784,6 +28826,7 @@ components:
- $ref: "#/components/schemas/WidgetLegacyLiveSpan"
- $ref: "#/components/schemas/WidgetNewLiveSpan"
- $ref: "#/components/schemas/WidgetNewFixedSpan"
- $ref: "#/components/schemas/WidgetCalendarAlignedSpan"
WidgetTimeWindows:
description: Define a time window.
enum:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,238 @@
/*
* 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;

/** Used for calendar-aligned time spans, such as the current month or previous year. */
@JsonPropertyOrder({
WidgetCalendarAlignedSpan.JSON_PROPERTY_HIDE_INCOMPLETE_COST_DATA,
WidgetCalendarAlignedSpan.JSON_PROPERTY_OFFSET,
WidgetCalendarAlignedSpan.JSON_PROPERTY_TIMEZONE,
WidgetCalendarAlignedSpan.JSON_PROPERTY_TYPE
})
@jakarta.annotation.Generated(
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
public class WidgetCalendarAlignedSpan {
@JsonIgnore public boolean unparsed = false;
public static final String JSON_PROPERTY_HIDE_INCOMPLETE_COST_DATA = "hide_incomplete_cost_data";
private Boolean hideIncompleteCostData;

public static final String JSON_PROPERTY_OFFSET = "offset";
private Long offset;

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

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

public WidgetCalendarAlignedSpan() {}

@JsonCreator
public WidgetCalendarAlignedSpan(
@JsonProperty(required = true, value = JSON_PROPERTY_OFFSET) Long offset,
@JsonProperty(required = true, value = JSON_PROPERTY_TYPE)
WidgetCalendarAlignedSpanType type) {
this.offset = offset;
this.type = type;
this.unparsed |= !type.isValid();
}

public WidgetCalendarAlignedSpan hideIncompleteCostData(Boolean hideIncompleteCostData) {
this.hideIncompleteCostData = hideIncompleteCostData;
return this;
}

/**
* Whether to hide incomplete cost data in the widget.
*
* @return hideIncompleteCostData
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_HIDE_INCOMPLETE_COST_DATA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getHideIncompleteCostData() {
return hideIncompleteCostData;
}

public void setHideIncompleteCostData(Boolean hideIncompleteCostData) {
this.hideIncompleteCostData = hideIncompleteCostData;
}

public WidgetCalendarAlignedSpan offset(Long offset) {
this.offset = offset;
return this;
}

/**
* Number of completed periods before the current period. 0 represents the current period.
* minimum: 0
*
* @return offset
*/
@JsonProperty(JSON_PROPERTY_OFFSET)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public Long getOffset() {
return offset;
}

public void setOffset(Long offset) {
this.offset = offset;
}

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

/**
* Time zone used to align the calendar period.
*
* @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 WidgetCalendarAlignedSpan type(WidgetCalendarAlignedSpanType type) {
this.type = type;
this.unparsed |= !type.isValid();
return this;
}

/**
* Calendar-aligned time span type.
*
* @return type
*/
@JsonProperty(JSON_PROPERTY_TYPE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public WidgetCalendarAlignedSpanType getType() {
return type;
}

public void setType(WidgetCalendarAlignedSpanType 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 WidgetCalendarAlignedSpan
*/
@JsonAnySetter
public WidgetCalendarAlignedSpan 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 WidgetCalendarAlignedSpan object is equal to o. */
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
WidgetCalendarAlignedSpan widgetCalendarAlignedSpan = (WidgetCalendarAlignedSpan) o;
return Objects.equals(
this.hideIncompleteCostData, widgetCalendarAlignedSpan.hideIncompleteCostData)
&& Objects.equals(this.offset, widgetCalendarAlignedSpan.offset)
&& Objects.equals(this.timezone, widgetCalendarAlignedSpan.timezone)
&& Objects.equals(this.type, widgetCalendarAlignedSpan.type)
&& Objects.equals(
this.additionalProperties, widgetCalendarAlignedSpan.additionalProperties);
}

@Override
public int hashCode() {
return Objects.hash(hideIncompleteCostData, offset, timezone, type, additionalProperties);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class WidgetCalendarAlignedSpan {\n");
sb.append(" hideIncompleteCostData: ")
.append(toIndentedString(hideIncompleteCostData))
.append("\n");
sb.append(" offset: ").append(toIndentedString(offset)).append("\n");
sb.append(" timezone: ").append(toIndentedString(timezone)).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,63 @@
/*
* 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;

/** Calendar-aligned time span type. */
@JsonSerialize(using = WidgetCalendarAlignedSpanType.WidgetCalendarAlignedSpanTypeSerializer.class)
public class WidgetCalendarAlignedSpanType extends ModelEnum<String> {

private static final Set<String> allowedValues =
new HashSet<String>(Arrays.asList("daily", "weekly", "monthly", "yearly"));

public static final WidgetCalendarAlignedSpanType DAILY =
new WidgetCalendarAlignedSpanType("daily");
public static final WidgetCalendarAlignedSpanType WEEKLY =
new WidgetCalendarAlignedSpanType("weekly");
public static final WidgetCalendarAlignedSpanType MONTHLY =
new WidgetCalendarAlignedSpanType("monthly");
public static final WidgetCalendarAlignedSpanType YEARLY =
new WidgetCalendarAlignedSpanType("yearly");

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

public static class WidgetCalendarAlignedSpanTypeSerializer
extends StdSerializer<WidgetCalendarAlignedSpanType> {
public WidgetCalendarAlignedSpanTypeSerializer(Class<WidgetCalendarAlignedSpanType> t) {
super(t);
}

public WidgetCalendarAlignedSpanTypeSerializer() {
this(null);
}

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

@JsonCreator
public static WidgetCalendarAlignedSpanType fromValue(String value) {
return new WidgetCalendarAlignedSpanType(value);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ public class WidgetLiveSpan extends ModelEnum<String> {
"week_to_date",
"month_to_date",
"1y",
"alert"));
"alert",
"full_week",
"full_month",
"year_to_date"));

public static final WidgetLiveSpan PAST_ONE_MINUTE = new WidgetLiveSpan("1m");
public static final WidgetLiveSpan PAST_FIVE_MINUTES = new WidgetLiveSpan("5m");
Expand All @@ -60,6 +63,9 @@ public class WidgetLiveSpan extends ModelEnum<String> {
public static final WidgetLiveSpan MONTH_TO_DATE = new WidgetLiveSpan("month_to_date");
public static final WidgetLiveSpan PAST_ONE_YEAR = new WidgetLiveSpan("1y");
public static final WidgetLiveSpan ALERT = new WidgetLiveSpan("alert");
public static final WidgetLiveSpan FULL_WEEK = new WidgetLiveSpan("full_week");
public static final WidgetLiveSpan FULL_MONTH = new WidgetLiveSpan("full_month");
public static final WidgetLiveSpan YEAR_TO_DATE = new WidgetLiveSpan("year_to_date");

WidgetLiveSpan(String value) {
super(value, allowedValues);
Expand Down
Loading
Loading