-
Notifications
You must be signed in to change notification settings - Fork 17
/
Token.go
154 lines (126 loc) · 3.48 KB
/
Token.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
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
package awscdk
import (
_init_ "github.com/aws/aws-cdk-go/awscdk/v2/jsii"
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
)
// Represents a special or lazily-evaluated value.
//
// Can be used to delay evaluation of a certain value in case, for example,
// that it requires some context or late-bound data. Can also be used to
// mark values that need special processing at document rendering time.
//
// Tokens can be embedded into strings while retaining their original
// semantics.
type Token interface {
}
// The jsii proxy struct for Token
type jsiiProxy_Token struct {
_ byte // padding
}
// Return a resolvable representation of the given value.
func Token_AsAny(value interface{}) IResolvable {
_init_.Initialize()
if err := validateToken_AsAnyParameters(value); err != nil {
panic(err)
}
var returns IResolvable
_jsii_.StaticInvoke(
"aws-cdk-lib.Token",
"asAny",
[]interface{}{value},
&returns,
)
return returns
}
// Return a reversible list representation of this token.
func Token_AsList(value interface{}, options *EncodingOptions) *[]*string {
_init_.Initialize()
if err := validateToken_AsListParameters(value, options); err != nil {
panic(err)
}
var returns *[]*string
_jsii_.StaticInvoke(
"aws-cdk-lib.Token",
"asList",
[]interface{}{value, options},
&returns,
)
return returns
}
// Return a reversible number representation of this token.
func Token_AsNumber(value interface{}) *float64 {
_init_.Initialize()
if err := validateToken_AsNumberParameters(value); err != nil {
panic(err)
}
var returns *float64
_jsii_.StaticInvoke(
"aws-cdk-lib.Token",
"asNumber",
[]interface{}{value},
&returns,
)
return returns
}
// Return a reversible string representation of this token.
//
// If the Token is initialized with a literal, the stringified value of the
// literal is returned. Otherwise, a special quoted string representation
// of the Token is returned that can be embedded into other strings.
//
// Strings with quoted Tokens in them can be restored back into
// complex values with the Tokens restored by calling `resolve()`
// on the string.
func Token_AsString(value interface{}, options *EncodingOptions) *string {
_init_.Initialize()
if err := validateToken_AsStringParameters(value, options); err != nil {
panic(err)
}
var returns *string
_jsii_.StaticInvoke(
"aws-cdk-lib.Token",
"asString",
[]interface{}{value, options},
&returns,
)
return returns
}
// Compare two strings that might contain Tokens with each other.
func Token_CompareStrings(possibleToken1 *string, possibleToken2 *string) TokenComparison {
_init_.Initialize()
if err := validateToken_CompareStringsParameters(possibleToken1, possibleToken2); err != nil {
panic(err)
}
var returns TokenComparison
_jsii_.StaticInvoke(
"aws-cdk-lib.Token",
"compareStrings",
[]interface{}{possibleToken1, possibleToken2},
&returns,
)
return returns
}
// Returns true if obj represents an unresolved value.
//
// One of these must be true:
//
// - `obj` is an IResolvable
// - `obj` is a string containing at least one encoded `IResolvable`
// - `obj` is either an encoded number or list
//
// This does NOT recurse into lists or objects to see if they
// contain resolvables.
func Token_IsUnresolved(obj interface{}) *bool {
_init_.Initialize()
if err := validateToken_IsUnresolvedParameters(obj); err != nil {
panic(err)
}
var returns *bool
_jsii_.StaticInvoke(
"aws-cdk-lib.Token",
"isUnresolved",
[]interface{}{obj},
&returns,
)
return returns
}