Skip to content
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
66 changes: 66 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2623,6 +2623,71 @@ components:
nullable: true
type: array
type: object
EmbeddedAppWidgetDefinition:
additionalProperties: false
description: The embedded app widget displays an App Builder app on a dashboard. Exactly one of `app_id` or `template_id` must be provided; they cannot be provided together.
properties:
app_id:
description: UUID of the App Builder app to embed.
example: "7e7745f9-4343-4927-b038-80934a355915"
type: string
custom_links:
description: List of custom links.
items:
$ref: "#/components/schemas/WidgetCustomLink"
type: array
description:
description: The description of the widget.
maxLength: 5000
type: string
inputs:
description: Inputs passed to the embedded app.
items:
$ref: "#/components/schemas/EmbeddedAppWidgetInput"
type: array
template_id:
description: ID of the built-in app template to embed.
example: ec2_manager
type: string
time:
$ref: "#/components/schemas/WidgetTime"
title:
description: Title of the widget.
type: string
title_align:
$ref: "#/components/schemas/WidgetTextAlign"
title_size:
description: Size of the title.
type: string
type:
$ref: "#/components/schemas/EmbeddedAppWidgetDefinitionType"
required:
- type
type: object
EmbeddedAppWidgetDefinitionType:
default: embedded_app
description: Type of the embedded app widget.
enum:
- embedded_app
example: embedded_app
type: string
x-enum-varnames:
- EMBEDDED_APP
EmbeddedAppWidgetInput:
additionalProperties: false
description: An input passed to the embedded app.
properties:
name:
description: Name of the app input.
example: environment
type: string
value:
description: Value of the app input. The API accepts a string, number, boolean, object, or a non-empty homogeneous array of those types.
example: production
required:
- name
- value
type: object
Event:
description: Object representing an event.
properties:
Expand Down Expand Up @@ -28167,6 +28232,7 @@ components:
- $ref: "#/components/schemas/CheckStatusWidgetDefinition"
- $ref: "#/components/schemas/CohortWidgetDefinition"
- $ref: "#/components/schemas/DistributionWidgetDefinition"
- $ref: "#/components/schemas/EmbeddedAppWidgetDefinition"
- $ref: "#/components/schemas/EventStreamWidgetDefinition"
- $ref: "#/components/schemas/EventTimelineWidgetDefinition"
- $ref: "#/components/schemas/FreeTextWidgetDefinition"
Expand Down
139 changes: 139 additions & 0 deletions src/datadog_api_client/v1/model/embedded_app_widget_definition.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
# 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.
from __future__ import annotations

from typing import List, Union, TYPE_CHECKING

from datadog_api_client.model_utils import (
ModelNormal,
cached_property,
unset,
UnsetType,
)


if TYPE_CHECKING:
from datadog_api_client.v1.model.widget_custom_link import WidgetCustomLink
from datadog_api_client.v1.model.embedded_app_widget_input import EmbeddedAppWidgetInput
from datadog_api_client.v1.model.widget_time import WidgetTime
from datadog_api_client.v1.model.widget_text_align import WidgetTextAlign
from datadog_api_client.v1.model.embedded_app_widget_definition_type import EmbeddedAppWidgetDefinitionType
from datadog_api_client.v1.model.widget_legacy_live_span import WidgetLegacyLiveSpan
from datadog_api_client.v1.model.widget_new_live_span import WidgetNewLiveSpan
from datadog_api_client.v1.model.widget_new_fixed_span import WidgetNewFixedSpan


class EmbeddedAppWidgetDefinition(ModelNormal):
validations = {
"description": {
"max_length": 5000,
},
}

@cached_property
def additional_properties_type(_):
return None

@cached_property
def openapi_types(_):
from datadog_api_client.v1.model.widget_custom_link import WidgetCustomLink
from datadog_api_client.v1.model.embedded_app_widget_input import EmbeddedAppWidgetInput
from datadog_api_client.v1.model.widget_time import WidgetTime
from datadog_api_client.v1.model.widget_text_align import WidgetTextAlign
from datadog_api_client.v1.model.embedded_app_widget_definition_type import EmbeddedAppWidgetDefinitionType

return {
"app_id": (str,),
"custom_links": ([WidgetCustomLink],),
"description": (str,),
"inputs": ([EmbeddedAppWidgetInput],),
"template_id": (str,),
"time": (WidgetTime,),
"title": (str,),
"title_align": (WidgetTextAlign,),
"title_size": (str,),
"type": (EmbeddedAppWidgetDefinitionType,),
}

attribute_map = {
"app_id": "app_id",
"custom_links": "custom_links",
"description": "description",
"inputs": "inputs",
"template_id": "template_id",
"time": "time",
"title": "title",
"title_align": "title_align",
"title_size": "title_size",
"type": "type",
}

def __init__(
self_,
type: EmbeddedAppWidgetDefinitionType,
app_id: Union[str, UnsetType] = unset,
custom_links: Union[List[WidgetCustomLink], UnsetType] = unset,
description: Union[str, UnsetType] = unset,
inputs: Union[List[EmbeddedAppWidgetInput], UnsetType] = unset,
template_id: Union[str, UnsetType] = unset,
time: Union[WidgetTime, WidgetLegacyLiveSpan, WidgetNewLiveSpan, WidgetNewFixedSpan, UnsetType] = unset,
title: Union[str, UnsetType] = unset,
title_align: Union[WidgetTextAlign, UnsetType] = unset,
title_size: Union[str, UnsetType] = unset,
**kwargs,
):
"""
The embedded app widget displays an App Builder app on a dashboard. Exactly one of ``app_id`` or ``template_id`` must be provided; they cannot be provided together.

:param app_id: UUID of the App Builder app to embed.
:type app_id: str, optional

:param custom_links: List of custom links.
:type custom_links: [WidgetCustomLink], optional

:param description: The description of the widget.
:type description: str, optional

:param inputs: Inputs passed to the embedded app.
:type inputs: [EmbeddedAppWidgetInput], optional

:param template_id: ID of the built-in app template to embed.
:type template_id: str, optional

:param time: Time setting for the widget.
:type time: WidgetTime, optional

:param title: Title of the widget.
:type title: str, optional

:param title_align: How to align the text on the widget.
:type title_align: WidgetTextAlign, optional

:param title_size: Size of the title.
:type title_size: str, optional

:param type: Type of the embedded app widget.
:type type: EmbeddedAppWidgetDefinitionType
"""
if app_id is not unset:
kwargs["app_id"] = app_id
if custom_links is not unset:
kwargs["custom_links"] = custom_links
if description is not unset:
kwargs["description"] = description
if inputs is not unset:
kwargs["inputs"] = inputs
if template_id is not unset:
kwargs["template_id"] = template_id
if time is not unset:
kwargs["time"] = time
if title is not unset:
kwargs["title"] = title
if title_align is not unset:
kwargs["title_align"] = title_align
if title_size is not unset:
kwargs["title_size"] = title_size
super().__init__(kwargs)

self_.type = type
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# 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.
from __future__ import annotations


from datadog_api_client.model_utils import (
ModelSimple,
cached_property,
)

from typing import ClassVar


class EmbeddedAppWidgetDefinitionType(ModelSimple):
"""
Type of the embedded app widget.

:param value: If omitted defaults to "embedded_app". Must be one of ["embedded_app"].
:type value: str
"""

allowed_values = {
"embedded_app",
}
EMBEDDED_APP: ClassVar["EmbeddedAppWidgetDefinitionType"]

@cached_property
def openapi_types(_):
return {
"value": (str,),
}


EmbeddedAppWidgetDefinitionType.EMBEDDED_APP = EmbeddedAppWidgetDefinitionType("embedded_app")
59 changes: 59 additions & 0 deletions src/datadog_api_client/v1/model/embedded_app_widget_input.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# 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.
from __future__ import annotations

from typing import Any

from datadog_api_client.model_utils import (
ModelNormal,
cached_property,
date,
datetime,
none_type,
UUID,
)


class EmbeddedAppWidgetInput(ModelNormal):
@cached_property
def additional_properties_type(_):
return None

@cached_property
def openapi_types(_):
return {
"name": (str,),
"value": (
bool,
date,
datetime,
dict,
float,
int,
list,
str,
UUID,
none_type,
),
}

attribute_map = {
"name": "name",
"value": "value",
}

def __init__(self_, name: str, value: Any, **kwargs):
"""
An input passed to the embedded app.

:param name: Name of the app input.
:type name: str

:param value: Value of the app input. The API accepts a string, number, boolean, object, or a non-empty homogeneous array of those types.
:type value: bool, date, datetime, dict, float, int, list, str, UUID, none_type
"""
super().__init__(kwargs)

self_.name = name
self_.value = value
2 changes: 2 additions & 0 deletions src/datadog_api_client/v1/model/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from datadog_api_client.v1.model.check_status_widget_definition import CheckStatusWidgetDefinition
from datadog_api_client.v1.model.cohort_widget_definition import CohortWidgetDefinition
from datadog_api_client.v1.model.distribution_widget_definition import DistributionWidgetDefinition
from datadog_api_client.v1.model.embedded_app_widget_definition import EmbeddedAppWidgetDefinition
from datadog_api_client.v1.model.event_stream_widget_definition import EventStreamWidgetDefinition
from datadog_api_client.v1.model.event_timeline_widget_definition import EventTimelineWidgetDefinition
from datadog_api_client.v1.model.free_text_widget_definition import FreeTextWidgetDefinition
Expand Down Expand Up @@ -90,6 +91,7 @@ def __init__(
CheckStatusWidgetDefinition,
CohortWidgetDefinition,
DistributionWidgetDefinition,
EmbeddedAppWidgetDefinition,
EventStreamWidgetDefinition,
EventTimelineWidgetDefinition,
FreeTextWidgetDefinition,
Expand Down
14 changes: 11 additions & 3 deletions src/datadog_api_client/v1/model/widget_definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,15 @@ def __init__(self, **kwargs):
:param yaxis: Y Axis controls for the distribution widget.
:type yaxis: DistributionWidgetYAxis, optional

:param app_id: UUID of the App Builder app to embed.
:type app_id: str, optional

:param inputs: Inputs passed to the embedded app.
:type inputs: [EmbeddedAppWidgetInput], optional

:param template_id: ID of the built-in app template to embed.
:type template_id: str, optional

:param event_size: Size to use to display an event.
:type event_size: WidgetEventSize, optional

Expand Down Expand Up @@ -248,9 +257,6 @@ def __init__(self, **kwargs):
:param timeseries_background: Set a timeseries on the widget background.
:type timeseries_background: TimeseriesBackground, optional

:param inputs: Array of workflow inputs to map to dashboard template variables.
:type inputs: [RunWorkflowWidgetInput], optional

:param workflow_id: Workflow id.
:type workflow_id: str

Expand Down Expand Up @@ -371,6 +377,7 @@ def _composed_schemas(_):
from datadog_api_client.v1.model.check_status_widget_definition import CheckStatusWidgetDefinition
from datadog_api_client.v1.model.cohort_widget_definition import CohortWidgetDefinition
from datadog_api_client.v1.model.distribution_widget_definition import DistributionWidgetDefinition
from datadog_api_client.v1.model.embedded_app_widget_definition import EmbeddedAppWidgetDefinition
from datadog_api_client.v1.model.event_stream_widget_definition import EventStreamWidgetDefinition
from datadog_api_client.v1.model.event_timeline_widget_definition import EventTimelineWidgetDefinition
from datadog_api_client.v1.model.free_text_widget_definition import FreeTextWidgetDefinition
Expand Down Expand Up @@ -417,6 +424,7 @@ def _composed_schemas(_):
CheckStatusWidgetDefinition,
CohortWidgetDefinition,
DistributionWidgetDefinition,
EmbeddedAppWidgetDefinition,
EventStreamWidgetDefinition,
EventTimelineWidgetDefinition,
FreeTextWidgetDefinition,
Expand Down
6 changes: 6 additions & 0 deletions src/datadog_api_client/v1/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@
from datadog_api_client.v1.model.downtime import Downtime
from datadog_api_client.v1.model.downtime_child import DowntimeChild
from datadog_api_client.v1.model.downtime_recurrence import DowntimeRecurrence
from datadog_api_client.v1.model.embedded_app_widget_definition import EmbeddedAppWidgetDefinition
from datadog_api_client.v1.model.embedded_app_widget_definition_type import EmbeddedAppWidgetDefinitionType
from datadog_api_client.v1.model.embedded_app_widget_input import EmbeddedAppWidgetInput
from datadog_api_client.v1.model.event import Event
from datadog_api_client.v1.model.event_alert_type import EventAlertType
from datadog_api_client.v1.model.event_create_request import EventCreateRequest
Expand Down Expand Up @@ -1594,6 +1597,9 @@
"Downtime",
"DowntimeChild",
"DowntimeRecurrence",
"EmbeddedAppWidgetDefinition",
"EmbeddedAppWidgetDefinitionType",
"EmbeddedAppWidgetInput",
"Event",
"EventAlertType",
"EventCreateRequest",
Expand Down
Loading