Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add title and background_color properties to dashboard group widget #770

Merged
merged 1 commit into from
Apr 19, 2021
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.4.1.dev6",
"regenerated": "2021-04-16 12:34:54.000831",
"spec_repo_commit": "9149cd6"
"regenerated": "2021-04-19 09:22:27.725723",
"spec_repo_commit": "2c91a1d"
},
"v2": {
"apigentools_version": "1.4.1.dev6",
"regenerated": "2021-04-16 12:35:39.842689",
"spec_repo_commit": "9149cd6"
"regenerated": "2021-04-19 09:23:15.510895",
"spec_repo_commit": "2c91a1d"
}
}
}
2 changes: 2 additions & 0 deletions api_docs/v1/GroupWidgetDefinition.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ The groups widget allows you to keep similar graphs together on your timeboard.

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**backgroundColor** | **String** | Background color of the group title. | [optional]
**layoutType** | **WidgetLayoutType** | |
**title** | **String** | Title of the widget. | [optional]
**titleAlign** | **WidgetTextAlign** | | [optional]
**type** | **GroupWidgetDefinitionType** | |
**widgets** | [**List<Widget>**](Widget.md) | List of widget groups. |

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,55 @@
"The groups widget allows you to keep similar graphs together on your timeboard. Each"
+ " group has a custom header, can hold one to many graphs, and is collapsible.")
@JsonPropertyOrder({
GroupWidgetDefinition.JSON_PROPERTY_BACKGROUND_COLOR,
GroupWidgetDefinition.JSON_PROPERTY_LAYOUT_TYPE,
GroupWidgetDefinition.JSON_PROPERTY_TITLE,
GroupWidgetDefinition.JSON_PROPERTY_TITLE_ALIGN,
GroupWidgetDefinition.JSON_PROPERTY_TYPE,
GroupWidgetDefinition.JSON_PROPERTY_WIDGETS
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class GroupWidgetDefinition {
public static final String JSON_PROPERTY_BACKGROUND_COLOR = "background_color";
private String backgroundColor;

public static final String JSON_PROPERTY_LAYOUT_TYPE = "layout_type";
private WidgetLayoutType layoutType;

public static final String JSON_PROPERTY_TITLE = "title";
private String title;

public static final String JSON_PROPERTY_TITLE_ALIGN = "title_align";
private WidgetTextAlign titleAlign;

public static final String JSON_PROPERTY_TYPE = "type";
private GroupWidgetDefinitionType type = GroupWidgetDefinitionType.GROUP;

public static final String JSON_PROPERTY_WIDGETS = "widgets";
private List<Widget> widgets = new ArrayList<>();

public GroupWidgetDefinition backgroundColor(String backgroundColor) {
this.backgroundColor = backgroundColor;
return this;
}

/**
* Background color of the group title.
*
* @return backgroundColor
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "Background color of the group title.")
@JsonProperty(JSON_PROPERTY_BACKGROUND_COLOR)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getBackgroundColor() {
return backgroundColor;
}

public void setBackgroundColor(String backgroundColor) {
this.backgroundColor = backgroundColor;
}

public GroupWidgetDefinition layoutType(WidgetLayoutType layoutType) {
this.layoutType = layoutType;
return this;
Expand Down Expand Up @@ -90,6 +120,28 @@ public void setTitle(String title) {
this.title = title;
}

public GroupWidgetDefinition titleAlign(WidgetTextAlign titleAlign) {
this.titleAlign = titleAlign;
return this;
}

/**
* Get titleAlign
*
* @return titleAlign
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_TITLE_ALIGN)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public WidgetTextAlign getTitleAlign() {
return titleAlign;
}

public void setTitleAlign(WidgetTextAlign titleAlign) {
this.titleAlign = titleAlign;
}

public GroupWidgetDefinition type(GroupWidgetDefinitionType type) {
this.type = type;
return this;
Expand Down Expand Up @@ -151,23 +203,27 @@ public boolean equals(Object o) {
return false;
}
GroupWidgetDefinition groupWidgetDefinition = (GroupWidgetDefinition) o;
return Objects.equals(this.layoutType, groupWidgetDefinition.layoutType)
return Objects.equals(this.backgroundColor, groupWidgetDefinition.backgroundColor)
&& Objects.equals(this.layoutType, groupWidgetDefinition.layoutType)
&& Objects.equals(this.title, groupWidgetDefinition.title)
&& Objects.equals(this.titleAlign, groupWidgetDefinition.titleAlign)
&& Objects.equals(this.type, groupWidgetDefinition.type)
&& Objects.equals(this.widgets, groupWidgetDefinition.widgets);
}

@Override
public int hashCode() {
return Objects.hash(layoutType, title, type, widgets);
return Objects.hash(backgroundColor, layoutType, title, titleAlign, type, widgets);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class GroupWidgetDefinition {\n");
sb.append(" backgroundColor: ").append(toIndentedString(backgroundColor)).append("\n");
sb.append(" layoutType: ").append(toIndentedString(layoutType)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).append("\n");
sb.append(" titleAlign: ").append(toIndentedString(titleAlign)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" widgets: ").append(toIndentedString(widgets)).append("\n");
sb.append("}");
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/com/datadog/api/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2242,11 +2242,16 @@ components:
your timeboard. Each group has a custom header, can hold one to many graphs,
and is collapsible.
properties:
background_color:
description: Background color of the group title.
type: string
layout_type:
$ref: '#/components/schemas/WidgetLayoutType'
title:
description: Title of the widget.
type: string
title_align:
$ref: '#/components/schemas/WidgetTextAlign'
type:
$ref: '#/components/schemas/GroupWidgetDefinitionType'
widgets:
Expand Down