-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathLogStreamWidgetDefinition.ts
More file actions
162 lines (155 loc) · 3.59 KB
/
LogStreamWidgetDefinition.ts
File metadata and controls
162 lines (155 loc) · 3.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
/**
* 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 2020-Present Datadog, Inc.
*/
import { LogStreamWidgetDefinitionType } from "./LogStreamWidgetDefinitionType";
import { WidgetFieldSort } from "./WidgetFieldSort";
import { WidgetMessageDisplay } from "./WidgetMessageDisplay";
import { WidgetTextAlign } from "./WidgetTextAlign";
import { WidgetTime } from "./WidgetTime";
import { AttributeTypeMap } from "../../datadog-api-client-common/util";
/**
* The Log Stream displays a log flow matching the defined query.
*/
export class LogStreamWidgetDefinition {
/**
* Which columns to display on the widget.
*/
"columns"?: Array<string>;
/**
* The description of the widget.
*/
"description"?: string;
/**
* An array of index names to query in the stream. Use [] to query all indexes at once.
*/
"indexes"?: Array<string>;
/**
* ID of the log set to use.
*/
"logset"?: string;
/**
* Amount of log lines to display
*/
"messageDisplay"?: WidgetMessageDisplay;
/**
* Query to filter the log stream with.
*/
"query"?: string;
/**
* Whether to show the date column or not
*/
"showDateColumn"?: boolean;
/**
* Whether to show the message column or not
*/
"showMessageColumn"?: boolean;
/**
* Which column and order to sort by
*/
"sort"?: WidgetFieldSort;
/**
* Time setting for the widget.
*/
"time"?: WidgetTime;
/**
* Title of the widget.
*/
"title"?: string;
/**
* How to align the text on the widget.
*/
"titleAlign"?: WidgetTextAlign;
/**
* Size of the title.
*/
"titleSize"?: string;
/**
* Type of the log stream widget.
*/
"type": LogStreamWidgetDefinitionType;
/**
* A container for additional, undeclared properties.
* This is a holder for any undeclared properties as specified with
* the 'additionalProperties' keyword in the OAS document.
*/
"additionalProperties"?: { [key: string]: any };
/**
* @ignore
*/
"_unparsed"?: boolean;
/**
* @ignore
*/
static readonly attributeTypeMap: AttributeTypeMap = {
columns: {
baseName: "columns",
type: "Array<string>",
},
description: {
baseName: "description",
type: "string",
},
indexes: {
baseName: "indexes",
type: "Array<string>",
},
logset: {
baseName: "logset",
type: "string",
},
messageDisplay: {
baseName: "message_display",
type: "WidgetMessageDisplay",
},
query: {
baseName: "query",
type: "string",
},
showDateColumn: {
baseName: "show_date_column",
type: "boolean",
},
showMessageColumn: {
baseName: "show_message_column",
type: "boolean",
},
sort: {
baseName: "sort",
type: "WidgetFieldSort",
},
time: {
baseName: "time",
type: "WidgetTime",
},
title: {
baseName: "title",
type: "string",
},
titleAlign: {
baseName: "title_align",
type: "WidgetTextAlign",
},
titleSize: {
baseName: "title_size",
type: "string",
},
type: {
baseName: "type",
type: "LogStreamWidgetDefinitionType",
required: true,
},
additionalProperties: {
baseName: "additionalProperties",
type: "{ [key: string]: any; }",
},
};
/**
* @ignore
*/
static getAttributeTypeMap(): AttributeTypeMap {
return LogStreamWidgetDefinition.attributeTypeMap;
}
public constructor() {}
}