-
Notifications
You must be signed in to change notification settings - Fork 17
/
TableThreshold.go
102 lines (83 loc) · 2.32 KB
/
TableThreshold.go
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
package awscloudwatch
import (
_init_ "github.com/aws/aws-cdk-go/awscdk/v2/jsii"
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
)
// Thresholds for highlighting cells in TableWidget.
//
// Example:
// var dashboard dashboard
//
//
// dashboard.AddWidgets(cloudwatch.NewTableWidget(&TableWidgetProps{
// // ...
//
// Thresholds: []tableThreshold{
// cloudwatch.*tableThreshold_Above(jsii.Number(1000), cloudwatch.Color_RED()),
// cloudwatch.*tableThreshold_Between(jsii.Number(500), jsii.Number(1000), cloudwatch.Color_ORANGE()),
// cloudwatch.*tableThreshold_Below(jsii.Number(500), cloudwatch.Color_GREEN()),
// },
// }))
//
type TableThreshold interface {
ToJson() interface{}
}
// The jsii proxy struct for TableThreshold
type jsiiProxy_TableThreshold struct {
_ byte // padding
}
// A threshold for highlighting and coloring cells above the specified value.
func TableThreshold_Above(value *float64, color *string) TableThreshold {
_init_.Initialize()
if err := validateTableThreshold_AboveParameters(value); err != nil {
panic(err)
}
var returns TableThreshold
_jsii_.StaticInvoke(
"aws-cdk-lib.aws_cloudwatch.TableThreshold",
"above",
[]interface{}{value, color},
&returns,
)
return returns
}
// A threshold for highlighting and coloring cells below the specified value.
func TableThreshold_Below(value *float64, color *string) TableThreshold {
_init_.Initialize()
if err := validateTableThreshold_BelowParameters(value); err != nil {
panic(err)
}
var returns TableThreshold
_jsii_.StaticInvoke(
"aws-cdk-lib.aws_cloudwatch.TableThreshold",
"below",
[]interface{}{value, color},
&returns,
)
return returns
}
// A threshold for highlighting and coloring cells within the specified values.
func TableThreshold_Between(lowerBound *float64, upperBound *float64, color *string) TableThreshold {
_init_.Initialize()
if err := validateTableThreshold_BetweenParameters(lowerBound, upperBound); err != nil {
panic(err)
}
var returns TableThreshold
_jsii_.StaticInvoke(
"aws-cdk-lib.aws_cloudwatch.TableThreshold",
"between",
[]interface{}{lowerBound, upperBound, color},
&returns,
)
return returns
}
func (t *jsiiProxy_TableThreshold) ToJson() interface{} {
var returns interface{}
_jsii_.Invoke(
t,
"toJson",
nil, // no parameters
&returns,
)
return returns
}