@@ -16,18 +16,31 @@ import { ObjectSerializer } from './ObjectSerializer';
16
16
*/
17
17
18
18
export class WidgetCustomLink {
19
+ /**
20
+ * The flag for toggling context menu link visibility.
21
+ */
22
+ 'isHidden' ?: boolean ;
19
23
/**
20
24
* The label for the custom link URL. Keep the label short and descriptive. Use metrics and tags as variables.
21
25
*/
22
- 'label' : string ;
26
+ 'label' ? : string ;
23
27
/**
24
28
* The URL of the custom link. URL must include `http` or `https`. A relative URL must start with `/`.
25
29
*/
26
- 'link' : string ;
30
+ 'link' ?: string ;
31
+ /**
32
+ * The label ID that refers to a context menu link. Can be `logs`, `hosts`, `traces`, `profiles`, `processes`, `containers`, or `rum`.
33
+ */
34
+ 'overrideLabel' ?: string ;
27
35
28
36
static readonly discriminator : string | undefined = undefined ;
29
37
30
38
static readonly attributeTypeMap : { [ key : string ] : { baseName : string , type : string , format : string } } = {
39
+ "isHidden" : {
40
+ "baseName" : "is_hidden" ,
41
+ "type" : "boolean" ,
42
+ "format" : ""
43
+ } ,
31
44
"label" : {
32
45
"baseName" : "label" ,
33
46
"type" : "string" ,
@@ -37,6 +50,11 @@ export class WidgetCustomLink {
37
50
"baseName" : "link" ,
38
51
"type" : "string" ,
39
52
"format" : ""
53
+ } ,
54
+ "overrideLabel" : {
55
+ "baseName" : "override_label" ,
56
+ "type" : "string" ,
57
+ "format" : ""
40
58
} } ;
41
59
42
60
static getAttributeTypeMap ( ) {
@@ -46,16 +64,14 @@ export class WidgetCustomLink {
46
64
static deserialize ( data : { [ key : string ] : any } ) : WidgetCustomLink {
47
65
let res = new WidgetCustomLink ( ) ;
48
66
49
- if ( data . label === undefined ) {
50
- throw new TypeError ( "missing required attribute 'label' on 'WidgetCustomLink' object" ) ;
51
- }
67
+ res . isHidden = ObjectSerializer . deserialize ( data . is_hidden , "boolean" , "" )
68
+
52
69
res . label = ObjectSerializer . deserialize ( data . label , "string" , "" )
53
70
54
- if ( data . link === undefined ) {
55
- throw new TypeError ( "missing required attribute 'link' on 'WidgetCustomLink' object" ) ;
56
- }
57
71
res . link = ObjectSerializer . deserialize ( data . link , "string" , "" )
58
72
73
+ res . overrideLabel = ObjectSerializer . deserialize ( data . override_label , "string" , "" )
74
+
59
75
60
76
return res ;
61
77
}
@@ -68,16 +84,14 @@ export class WidgetCustomLink {
68
84
throw new TypeError ( `${ key } attribute not in schema` ) ;
69
85
}
70
86
}
71
- if ( data . label === undefined ) {
72
- throw new TypeError ( "missing required attribute 'label' on 'WidgetCustomLink' object" ) ;
73
- }
87
+ res . is_hidden = ObjectSerializer . serialize ( data . isHidden , "boolean" , "" )
88
+
74
89
res . label = ObjectSerializer . serialize ( data . label , "string" , "" )
75
90
76
- if ( data . link === undefined ) {
77
- throw new TypeError ( "missing required attribute 'link' on 'WidgetCustomLink' object" ) ;
78
- }
79
91
res . link = ObjectSerializer . serialize ( data . link , "string" , "" )
80
92
93
+ res . override_label = ObjectSerializer . serialize ( data . overrideLabel , "string" , "" )
94
+
81
95
return res
82
96
}
83
97
0 commit comments