|
| 1 | +/** |
| 2 | + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. |
| 3 | + * This product includes software developed at Datadog (https://www.datadoghq.com/). |
| 4 | + * Copyright 2020-Present Datadog, Inc. |
| 5 | + */ |
| 6 | +import { WidgetCustomLink } from "./WidgetCustomLink"; |
| 7 | +import { WidgetTextAlign } from "./WidgetTextAlign"; |
| 8 | +import { WidgetTime } from "./WidgetTime"; |
| 9 | +import { WildcardWidgetDefinitionType } from "./WildcardWidgetDefinitionType"; |
| 10 | +import { WildcardWidgetRequest } from "./WildcardWidgetRequest"; |
| 11 | +import { WildcardWidgetSpecification } from "./WildcardWidgetSpecification"; |
| 12 | + |
| 13 | +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; |
| 14 | + |
| 15 | +/** |
| 16 | + * Custom visualization widget using Vega or Vega-Lite specifications. Combines standard Datadog data requests with a Vega or Vega-Lite JSON specification for flexible, custom visualizations. |
| 17 | + */ |
| 18 | +export class WildcardWidgetDefinition { |
| 19 | + /** |
| 20 | + * List of custom links. |
| 21 | + */ |
| 22 | + "customLinks"?: Array<WidgetCustomLink>; |
| 23 | + /** |
| 24 | + * List of data requests for the wildcard widget. |
| 25 | + */ |
| 26 | + "requests": Array<WildcardWidgetRequest>; |
| 27 | + /** |
| 28 | + * Vega or Vega-Lite specification for custom visualization rendering. See https://vega.github.io/vega-lite/ for the full grammar reference. |
| 29 | + */ |
| 30 | + "specification": WildcardWidgetSpecification; |
| 31 | + /** |
| 32 | + * Time setting for the widget. |
| 33 | + */ |
| 34 | + "time"?: WidgetTime; |
| 35 | + /** |
| 36 | + * Title of the widget. |
| 37 | + */ |
| 38 | + "title"?: string; |
| 39 | + /** |
| 40 | + * How to align the text on the widget. |
| 41 | + */ |
| 42 | + "titleAlign"?: WidgetTextAlign; |
| 43 | + /** |
| 44 | + * Size of the title. |
| 45 | + */ |
| 46 | + "titleSize"?: string; |
| 47 | + /** |
| 48 | + * Type of the wildcard widget. |
| 49 | + */ |
| 50 | + "type": WildcardWidgetDefinitionType; |
| 51 | + |
| 52 | + /** |
| 53 | + * A container for additional, undeclared properties. |
| 54 | + * This is a holder for any undeclared properties as specified with |
| 55 | + * the 'additionalProperties' keyword in the OAS document. |
| 56 | + */ |
| 57 | + "additionalProperties"?: { [key: string]: any }; |
| 58 | + |
| 59 | + /** |
| 60 | + * @ignore |
| 61 | + */ |
| 62 | + "_unparsed"?: boolean; |
| 63 | + |
| 64 | + /** |
| 65 | + * @ignore |
| 66 | + */ |
| 67 | + static readonly attributeTypeMap: AttributeTypeMap = { |
| 68 | + customLinks: { |
| 69 | + baseName: "custom_links", |
| 70 | + type: "Array<WidgetCustomLink>", |
| 71 | + }, |
| 72 | + requests: { |
| 73 | + baseName: "requests", |
| 74 | + type: "Array<WildcardWidgetRequest>", |
| 75 | + required: true, |
| 76 | + }, |
| 77 | + specification: { |
| 78 | + baseName: "specification", |
| 79 | + type: "WildcardWidgetSpecification", |
| 80 | + required: true, |
| 81 | + }, |
| 82 | + time: { |
| 83 | + baseName: "time", |
| 84 | + type: "WidgetTime", |
| 85 | + }, |
| 86 | + title: { |
| 87 | + baseName: "title", |
| 88 | + type: "string", |
| 89 | + }, |
| 90 | + titleAlign: { |
| 91 | + baseName: "title_align", |
| 92 | + type: "WidgetTextAlign", |
| 93 | + }, |
| 94 | + titleSize: { |
| 95 | + baseName: "title_size", |
| 96 | + type: "string", |
| 97 | + }, |
| 98 | + type: { |
| 99 | + baseName: "type", |
| 100 | + type: "WildcardWidgetDefinitionType", |
| 101 | + required: true, |
| 102 | + }, |
| 103 | + additionalProperties: { |
| 104 | + baseName: "additionalProperties", |
| 105 | + type: "{ [key: string]: any; }", |
| 106 | + }, |
| 107 | + }; |
| 108 | + |
| 109 | + /** |
| 110 | + * @ignore |
| 111 | + */ |
| 112 | + static getAttributeTypeMap(): AttributeTypeMap { |
| 113 | + return WildcardWidgetDefinition.attributeTypeMap; |
| 114 | + } |
| 115 | + |
| 116 | + public constructor() {} |
| 117 | +} |
0 commit comments