Skip to content

[DEX-114] add custom extent prop for geomap widget #2894

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
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-06-06 14:53:22.185897",
"spec_repo_commit": "e591d5d4"
"regenerated": "2025-06-06 17:05:54.567011",
"spec_repo_commit": "b8f8eb97"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-06-06 14:53:22.203481",
"spec_repo_commit": "e591d5d4"
"regenerated": "2025-06-06 17:05:54.582587",
"spec_repo_commit": "b8f8eb97"
}
}
}
16 changes: 16 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3439,6 +3439,22 @@ components:
example:
focus: WORLD
properties:
custom_extent:
description: A custom extent of the map defined by an array of four numbers
in the order `[minLongitude, minLatitude, maxLongitude, maxLatitude]`.
example:
- -30
- -40
- 40
- 30
items:
description: The longitudinal or latitudinal coordinates of the bounding
box.
format: double
type: number
maxItems: 4
minItems: 4
type: array
focus:
description: The 2-letter ISO code of a country to focus the map on. Or
`WORLD`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,24 @@
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;

/** The view of the world that the map should render. */
@JsonPropertyOrder({GeomapWidgetDefinitionView.JSON_PROPERTY_FOCUS})
@JsonPropertyOrder({
GeomapWidgetDefinitionView.JSON_PROPERTY_CUSTOM_EXTENT,
GeomapWidgetDefinitionView.JSON_PROPERTY_FOCUS
})
@jakarta.annotation.Generated(
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
public class GeomapWidgetDefinitionView {
@JsonIgnore public boolean unparsed = false;
public static final String JSON_PROPERTY_CUSTOM_EXTENT = "custom_extent";
private List<Double> customExtent = null;

public static final String JSON_PROPERTY_FOCUS = "focus";
private String focus;

Expand All @@ -34,6 +42,36 @@ public GeomapWidgetDefinitionView(
this.focus = focus;
}

public GeomapWidgetDefinitionView customExtent(List<Double> customExtent) {
this.customExtent = customExtent;
return this;
}

public GeomapWidgetDefinitionView addCustomExtentItem(Double customExtentItem) {
if (this.customExtent == null) {
this.customExtent = new ArrayList<>();
}
this.customExtent.add(customExtentItem);
return this;
}

/**
* A custom extent of the map defined by an array of four numbers in the order <code>
* [minLongitude, minLatitude, maxLongitude, maxLatitude]</code>.
*
* @return customExtent
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_CUSTOM_EXTENT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<Double> getCustomExtent() {
return customExtent;
}

public void setCustomExtent(List<Double> customExtent) {
this.customExtent = customExtent;
}

public GeomapWidgetDefinitionView focus(String focus) {
this.focus = focus;
return this;
Expand Down Expand Up @@ -110,20 +148,22 @@ public boolean equals(Object o) {
return false;
}
GeomapWidgetDefinitionView geomapWidgetDefinitionView = (GeomapWidgetDefinitionView) o;
return Objects.equals(this.focus, geomapWidgetDefinitionView.focus)
return Objects.equals(this.customExtent, geomapWidgetDefinitionView.customExtent)
&& Objects.equals(this.focus, geomapWidgetDefinitionView.focus)
&& Objects.equals(
this.additionalProperties, geomapWidgetDefinitionView.additionalProperties);
}

@Override
public int hashCode() {
return Objects.hash(focus, additionalProperties);
return Objects.hash(customExtent, focus, additionalProperties);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class GeomapWidgetDefinitionView {\n");
sb.append(" customExtent: ").append(toIndentedString(customExtent)).append("\n");
sb.append(" focus: ").append(toIndentedString(focus)).append("\n");
sb.append(" additionalProperties: ")
.append(toIndentedString(additionalProperties))
Expand Down