-
Notifications
You must be signed in to change notification settings - Fork 1
/
ResolutionContext.go
143 lines (124 loc) · 2.84 KB
/
ResolutionContext.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
package cdk8s
import (
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
_init_ "github.com/cdk8s-team/cdk8s-core-go/cdk8s/jsii"
)
// Context object for a specific resolution process.
type ResolutionContext interface {
// Which key is currently being resolved.
Key() *[]*string
// Which ApiObject is currently being resolved.
Obj() ApiObject
// Whether or not the value was replaced by invoking the `replaceValue` method.
Replaced() *bool
SetReplaced(val *bool)
// The replaced value that was set via the `replaceValue` method.
ReplacedValue() interface{}
SetReplacedValue(val interface{})
// The value associated to the key currently being resolved.
Value() interface{}
// Replaces the original value in this resolution context with a new value.
//
// The new value is what will end up in the manifest.
ReplaceValue(newValue interface{})
}
// The jsii proxy struct for ResolutionContext
type jsiiProxy_ResolutionContext struct {
_ byte // padding
}
func (j *jsiiProxy_ResolutionContext) Key() *[]*string {
var returns *[]*string
_jsii_.Get(
j,
"key",
&returns,
)
return returns
}
func (j *jsiiProxy_ResolutionContext) Obj() ApiObject {
var returns ApiObject
_jsii_.Get(
j,
"obj",
&returns,
)
return returns
}
func (j *jsiiProxy_ResolutionContext) Replaced() *bool {
var returns *bool
_jsii_.Get(
j,
"replaced",
&returns,
)
return returns
}
func (j *jsiiProxy_ResolutionContext) ReplacedValue() interface{} {
var returns interface{}
_jsii_.Get(
j,
"replacedValue",
&returns,
)
return returns
}
func (j *jsiiProxy_ResolutionContext) Value() interface{} {
var returns interface{}
_jsii_.Get(
j,
"value",
&returns,
)
return returns
}
func NewResolutionContext(obj ApiObject, key *[]*string, value interface{}) ResolutionContext {
_init_.Initialize()
if err := validateNewResolutionContextParameters(obj, key, value); err != nil {
panic(err)
}
j := jsiiProxy_ResolutionContext{}
_jsii_.Create(
"cdk8s.ResolutionContext",
[]interface{}{obj, key, value},
&j,
)
return &j
}
func NewResolutionContext_Override(r ResolutionContext, obj ApiObject, key *[]*string, value interface{}) {
_init_.Initialize()
_jsii_.Create(
"cdk8s.ResolutionContext",
[]interface{}{obj, key, value},
r,
)
}
func (j *jsiiProxy_ResolutionContext)SetReplaced(val *bool) {
if err := j.validateSetReplacedParameters(val); err != nil {
panic(err)
}
_jsii_.Set(
j,
"replaced",
val,
)
}
func (j *jsiiProxy_ResolutionContext)SetReplacedValue(val interface{}) {
if err := j.validateSetReplacedValueParameters(val); err != nil {
panic(err)
}
_jsii_.Set(
j,
"replacedValue",
val,
)
}
func (r *jsiiProxy_ResolutionContext) ReplaceValue(newValue interface{}) {
if err := r.validateReplaceValueParameters(newValue); err != nil {
panic(err)
}
_jsii_.InvokeVoid(
r,
"replaceValue",
[]interface{}{newValue},
)
}