/
endpointSliceList.go
294 lines (233 loc) · 11.9 KB
/
endpointSliceList.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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
// *** WARNING: this file was generated by pulumigen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package v1beta1
import (
"context"
"reflect"
"github.com/pkg/errors"
metav1 "github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes/meta/v1"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// EndpointSliceList represents a list of endpoint slices
type EndpointSliceList struct {
pulumi.CustomResourceState
// APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"`
// List of endpoint slices
Items EndpointSliceTypeArrayOutput `pulumi:"items"`
// Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Kind pulumi.StringPtrOutput `pulumi:"kind"`
// Standard list metadata.
Metadata metav1.ListMetaPtrOutput `pulumi:"metadata"`
}
// NewEndpointSliceList registers a new resource with the given unique name, arguments, and options.
func NewEndpointSliceList(ctx *pulumi.Context,
name string, args *EndpointSliceListArgs, opts ...pulumi.ResourceOption) (*EndpointSliceList, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Items == nil {
return nil, errors.New("invalid value for required argument 'Items'")
}
args.ApiVersion = pulumi.StringPtr("discovery.k8s.io/v1beta1")
args.Kind = pulumi.StringPtr("EndpointSliceList")
var resource EndpointSliceList
err := ctx.RegisterResource("kubernetes:discovery.k8s.io/v1beta1:EndpointSliceList", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetEndpointSliceList gets an existing EndpointSliceList resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetEndpointSliceList(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *EndpointSliceListState, opts ...pulumi.ResourceOption) (*EndpointSliceList, error) {
var resource EndpointSliceList
err := ctx.ReadResource("kubernetes:discovery.k8s.io/v1beta1:EndpointSliceList", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering EndpointSliceList resources.
type endpointSliceListState struct {
}
type EndpointSliceListState struct {
}
func (EndpointSliceListState) ElementType() reflect.Type {
return reflect.TypeOf((*endpointSliceListState)(nil)).Elem()
}
type endpointSliceListArgs struct {
// APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
ApiVersion *string `pulumi:"apiVersion"`
// List of endpoint slices
Items []EndpointSliceType `pulumi:"items"`
// Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Kind *string `pulumi:"kind"`
// Standard list metadata.
Metadata *metav1.ListMeta `pulumi:"metadata"`
}
// The set of arguments for constructing a EndpointSliceList resource.
type EndpointSliceListArgs struct {
// APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
ApiVersion pulumi.StringPtrInput
// List of endpoint slices
Items EndpointSliceTypeArrayInput
// Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Kind pulumi.StringPtrInput
// Standard list metadata.
Metadata metav1.ListMetaPtrInput
}
func (EndpointSliceListArgs) ElementType() reflect.Type {
return reflect.TypeOf((*endpointSliceListArgs)(nil)).Elem()
}
type EndpointSliceListInput interface {
pulumi.Input
ToEndpointSliceListOutput() EndpointSliceListOutput
ToEndpointSliceListOutputWithContext(ctx context.Context) EndpointSliceListOutput
}
func (*EndpointSliceList) ElementType() reflect.Type {
return reflect.TypeOf((*EndpointSliceList)(nil))
}
func (i *EndpointSliceList) ToEndpointSliceListOutput() EndpointSliceListOutput {
return i.ToEndpointSliceListOutputWithContext(context.Background())
}
func (i *EndpointSliceList) ToEndpointSliceListOutputWithContext(ctx context.Context) EndpointSliceListOutput {
return pulumi.ToOutputWithContext(ctx, i).(EndpointSliceListOutput)
}
func (i *EndpointSliceList) ToEndpointSliceListPtrOutput() EndpointSliceListPtrOutput {
return i.ToEndpointSliceListPtrOutputWithContext(context.Background())
}
func (i *EndpointSliceList) ToEndpointSliceListPtrOutputWithContext(ctx context.Context) EndpointSliceListPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(EndpointSliceListPtrOutput)
}
type EndpointSliceListPtrInput interface {
pulumi.Input
ToEndpointSliceListPtrOutput() EndpointSliceListPtrOutput
ToEndpointSliceListPtrOutputWithContext(ctx context.Context) EndpointSliceListPtrOutput
}
type endpointSliceListPtrType EndpointSliceListArgs
func (*endpointSliceListPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**EndpointSliceList)(nil))
}
func (i *endpointSliceListPtrType) ToEndpointSliceListPtrOutput() EndpointSliceListPtrOutput {
return i.ToEndpointSliceListPtrOutputWithContext(context.Background())
}
func (i *endpointSliceListPtrType) ToEndpointSliceListPtrOutputWithContext(ctx context.Context) EndpointSliceListPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(EndpointSliceListPtrOutput)
}
// EndpointSliceListArrayInput is an input type that accepts EndpointSliceListArray and EndpointSliceListArrayOutput values.
// You can construct a concrete instance of `EndpointSliceListArrayInput` via:
//
// EndpointSliceListArray{ EndpointSliceListArgs{...} }
type EndpointSliceListArrayInput interface {
pulumi.Input
ToEndpointSliceListArrayOutput() EndpointSliceListArrayOutput
ToEndpointSliceListArrayOutputWithContext(context.Context) EndpointSliceListArrayOutput
}
type EndpointSliceListArray []EndpointSliceListInput
func (EndpointSliceListArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*EndpointSliceList)(nil)).Elem()
}
func (i EndpointSliceListArray) ToEndpointSliceListArrayOutput() EndpointSliceListArrayOutput {
return i.ToEndpointSliceListArrayOutputWithContext(context.Background())
}
func (i EndpointSliceListArray) ToEndpointSliceListArrayOutputWithContext(ctx context.Context) EndpointSliceListArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(EndpointSliceListArrayOutput)
}
// EndpointSliceListMapInput is an input type that accepts EndpointSliceListMap and EndpointSliceListMapOutput values.
// You can construct a concrete instance of `EndpointSliceListMapInput` via:
//
// EndpointSliceListMap{ "key": EndpointSliceListArgs{...} }
type EndpointSliceListMapInput interface {
pulumi.Input
ToEndpointSliceListMapOutput() EndpointSliceListMapOutput
ToEndpointSliceListMapOutputWithContext(context.Context) EndpointSliceListMapOutput
}
type EndpointSliceListMap map[string]EndpointSliceListInput
func (EndpointSliceListMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*EndpointSliceList)(nil)).Elem()
}
func (i EndpointSliceListMap) ToEndpointSliceListMapOutput() EndpointSliceListMapOutput {
return i.ToEndpointSliceListMapOutputWithContext(context.Background())
}
func (i EndpointSliceListMap) ToEndpointSliceListMapOutputWithContext(ctx context.Context) EndpointSliceListMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(EndpointSliceListMapOutput)
}
type EndpointSliceListOutput struct{ *pulumi.OutputState }
func (EndpointSliceListOutput) ElementType() reflect.Type {
return reflect.TypeOf((*EndpointSliceList)(nil))
}
func (o EndpointSliceListOutput) ToEndpointSliceListOutput() EndpointSliceListOutput {
return o
}
func (o EndpointSliceListOutput) ToEndpointSliceListOutputWithContext(ctx context.Context) EndpointSliceListOutput {
return o
}
func (o EndpointSliceListOutput) ToEndpointSliceListPtrOutput() EndpointSliceListPtrOutput {
return o.ToEndpointSliceListPtrOutputWithContext(context.Background())
}
func (o EndpointSliceListOutput) ToEndpointSliceListPtrOutputWithContext(ctx context.Context) EndpointSliceListPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v EndpointSliceList) *EndpointSliceList {
return &v
}).(EndpointSliceListPtrOutput)
}
type EndpointSliceListPtrOutput struct{ *pulumi.OutputState }
func (EndpointSliceListPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**EndpointSliceList)(nil))
}
func (o EndpointSliceListPtrOutput) ToEndpointSliceListPtrOutput() EndpointSliceListPtrOutput {
return o
}
func (o EndpointSliceListPtrOutput) ToEndpointSliceListPtrOutputWithContext(ctx context.Context) EndpointSliceListPtrOutput {
return o
}
func (o EndpointSliceListPtrOutput) Elem() EndpointSliceListOutput {
return o.ApplyT(func(v *EndpointSliceList) EndpointSliceList {
if v != nil {
return *v
}
var ret EndpointSliceList
return ret
}).(EndpointSliceListOutput)
}
type EndpointSliceListArrayOutput struct{ *pulumi.OutputState }
func (EndpointSliceListArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]EndpointSliceList)(nil))
}
func (o EndpointSliceListArrayOutput) ToEndpointSliceListArrayOutput() EndpointSliceListArrayOutput {
return o
}
func (o EndpointSliceListArrayOutput) ToEndpointSliceListArrayOutputWithContext(ctx context.Context) EndpointSliceListArrayOutput {
return o
}
func (o EndpointSliceListArrayOutput) Index(i pulumi.IntInput) EndpointSliceListOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) EndpointSliceList {
return vs[0].([]EndpointSliceList)[vs[1].(int)]
}).(EndpointSliceListOutput)
}
type EndpointSliceListMapOutput struct{ *pulumi.OutputState }
func (EndpointSliceListMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]EndpointSliceList)(nil))
}
func (o EndpointSliceListMapOutput) ToEndpointSliceListMapOutput() EndpointSliceListMapOutput {
return o
}
func (o EndpointSliceListMapOutput) ToEndpointSliceListMapOutputWithContext(ctx context.Context) EndpointSliceListMapOutput {
return o
}
func (o EndpointSliceListMapOutput) MapIndex(k pulumi.StringInput) EndpointSliceListOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) EndpointSliceList {
return vs[0].(map[string]EndpointSliceList)[vs[1].(string)]
}).(EndpointSliceListOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*EndpointSliceListInput)(nil)).Elem(), &EndpointSliceList{})
pulumi.RegisterInputType(reflect.TypeOf((*EndpointSliceListPtrInput)(nil)).Elem(), &EndpointSliceList{})
pulumi.RegisterInputType(reflect.TypeOf((*EndpointSliceListArrayInput)(nil)).Elem(), EndpointSliceListArray{})
pulumi.RegisterInputType(reflect.TypeOf((*EndpointSliceListMapInput)(nil)).Elem(), EndpointSliceListMap{})
pulumi.RegisterOutputType(EndpointSliceListOutput{})
pulumi.RegisterOutputType(EndpointSliceListPtrOutput{})
pulumi.RegisterOutputType(EndpointSliceListArrayOutput{})
pulumi.RegisterOutputType(EndpointSliceListMapOutput{})
}