/
wirelessRouterItem.go
328 lines (274 loc) · 13.2 KB
/
wirelessRouterItem.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
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
// Code generated by Pulumi SDK Generator DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package onepassword
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type WirelessRouterItem struct {
pulumi.CustomResourceState
AirPortId pulumi.StringPtrOutput `pulumi:"airPortId"`
AttachedStoragePassword pulumi.StringPtrOutput `pulumi:"attachedStoragePassword"`
Attachments OutFieldMapOutput `pulumi:"attachments"`
BaseStationName pulumi.StringPtrOutput `pulumi:"baseStationName"`
BaseStationPassword pulumi.StringPtrOutput `pulumi:"baseStationPassword"`
Category pulumi.StringOutput `pulumi:"category"`
Fields OutFieldMapOutput `pulumi:"fields"`
NetworkName pulumi.StringPtrOutput `pulumi:"networkName"`
Notes pulumi.StringPtrOutput `pulumi:"notes"`
References OutFieldMapOutput `pulumi:"references"`
Sections OutSectionMapOutput `pulumi:"sections"`
ServerIpAddress pulumi.StringPtrOutput `pulumi:"serverIpAddress"`
// An array of strings of the tags assigned to the item.
Tags pulumi.StringArrayOutput `pulumi:"tags"`
// The title of the item.
Title pulumi.StringOutput `pulumi:"title"`
// The UUID of the item to retrieve. This field will be populated with the UUID of the item if the item it looked up by its title.
Uuid pulumi.StringOutput `pulumi:"uuid"`
// The UUID of the vault the item is in.
Vault pulumi.StringOutput `pulumi:"vault"`
WirelessNetworkPassword pulumi.StringPtrOutput `pulumi:"wirelessNetworkPassword"`
WirelessSecurity pulumi.StringPtrOutput `pulumi:"wirelessSecurity"`
}
// NewWirelessRouterItem registers a new resource with the given unique name, arguments, and options.
func NewWirelessRouterItem(ctx *pulumi.Context,
name string, args *WirelessRouterItemArgs, opts ...pulumi.ResourceOption) (*WirelessRouterItem, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Vault == nil {
return nil, errors.New("invalid value for required argument 'Vault'")
}
args.Category = pulumi.StringPtr("Wireless Router")
if args.AttachedStoragePassword != nil {
args.AttachedStoragePassword = pulumi.ToSecret(args.AttachedStoragePassword).(pulumi.StringPtrOutput)
}
if args.BaseStationPassword != nil {
args.BaseStationPassword = pulumi.ToSecret(args.BaseStationPassword).(pulumi.StringPtrOutput)
}
if args.WirelessNetworkPassword != nil {
args.WirelessNetworkPassword = pulumi.ToSecret(args.WirelessNetworkPassword).(pulumi.StringPtrOutput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"attachedStoragePassword",
"attachments",
"baseStationPassword",
"fields",
"references",
"sections",
"wirelessNetworkPassword",
})
opts = append(opts, secrets)
var resource WirelessRouterItem
err := ctx.RegisterResource("one-password-native:index:WirelessRouterItem", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetWirelessRouterItem gets an existing WirelessRouterItem 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 GetWirelessRouterItem(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *WirelessRouterItemState, opts ...pulumi.ResourceOption) (*WirelessRouterItem, error) {
var resource WirelessRouterItem
err := ctx.ReadResource("one-password-native:index:WirelessRouterItem", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering WirelessRouterItem resources.
type wirelessRouterItemState struct {
// The UUID of the vault the item is in.
Vault *string `pulumi:"vault"`
}
type WirelessRouterItemState struct {
// The UUID of the vault the item is in.
Vault pulumi.StringInput
}
func (WirelessRouterItemState) ElementType() reflect.Type {
return reflect.TypeOf((*wirelessRouterItemState)(nil)).Elem()
}
type wirelessRouterItemArgs struct {
AirPortId *string `pulumi:"airPortId"`
AttachedStoragePassword *string `pulumi:"attachedStoragePassword"`
Attachments map[string]pulumi.AssetOrArchive `pulumi:"attachments"`
BaseStationName *string `pulumi:"baseStationName"`
BaseStationPassword *string `pulumi:"baseStationPassword"`
// The category of the vault the item is in.
Category *string `pulumi:"category"`
Fields map[string]Field `pulumi:"fields"`
NetworkName *string `pulumi:"networkName"`
Notes *string `pulumi:"notes"`
Sections map[string]Section `pulumi:"sections"`
ServerIpAddress *string `pulumi:"serverIpAddress"`
// An array of strings of the tags assigned to the item.
Tags []string `pulumi:"tags"`
// The title of the item to retrieve. This field will be populated with the title of the item if the item it looked up by its UUID.
Title *string `pulumi:"title"`
// The UUID of the vault the item is in.
Vault string `pulumi:"vault"`
WirelessNetworkPassword *string `pulumi:"wirelessNetworkPassword"`
WirelessSecurity *string `pulumi:"wirelessSecurity"`
}
// The set of arguments for constructing a WirelessRouterItem resource.
type WirelessRouterItemArgs struct {
AirPortId pulumi.StringPtrInput
AttachedStoragePassword pulumi.StringPtrInput
Attachments pulumi.AssetOrArchiveMapInput
BaseStationName pulumi.StringPtrInput
BaseStationPassword pulumi.StringPtrInput
// The category of the vault the item is in.
Category pulumi.StringPtrInput
Fields FieldMapInput
NetworkName pulumi.StringPtrInput
Notes pulumi.StringPtrInput
Sections SectionMapInput
ServerIpAddress pulumi.StringPtrInput
// An array of strings of the tags assigned to the item.
Tags pulumi.StringArrayInput
// The title of the item to retrieve. This field will be populated with the title of the item if the item it looked up by its UUID.
Title pulumi.StringPtrInput
// The UUID of the vault the item is in.
Vault pulumi.StringInput
WirelessNetworkPassword pulumi.StringPtrInput
WirelessSecurity pulumi.StringPtrInput
}
func (WirelessRouterItemArgs) ElementType() reflect.Type {
return reflect.TypeOf((*wirelessRouterItemArgs)(nil)).Elem()
}
func (r *WirelessRouterItem) GetAttachment(ctx *pulumi.Context, args *WirelessRouterItemGetAttachmentArgs) (WirelessRouterItemGetAttachmentResultOutput, error) {
out, err := ctx.Call("one-password-native:index:WirelessRouterItem/attachment", args, WirelessRouterItemGetAttachmentResultOutput{}, r)
if err != nil {
return WirelessRouterItemGetAttachmentResultOutput{}, err
}
return out.(WirelessRouterItemGetAttachmentResultOutput), nil
}
type wirelessRouterItemGetAttachmentArgs struct {
// The name or uuid of the attachment to get
Name string `pulumi:"name"`
}
// The set of arguments for the GetAttachment method of the WirelessRouterItem resource.
type WirelessRouterItemGetAttachmentArgs struct {
// The name or uuid of the attachment to get
Name pulumi.StringInput
}
func (WirelessRouterItemGetAttachmentArgs) ElementType() reflect.Type {
return reflect.TypeOf((*wirelessRouterItemGetAttachmentArgs)(nil)).Elem()
}
// The resolved reference value
type WirelessRouterItemGetAttachmentResult struct {
// the value of the attachment
Value string `pulumi:"value"`
}
type WirelessRouterItemGetAttachmentResultOutput struct{ *pulumi.OutputState }
func (WirelessRouterItemGetAttachmentResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*WirelessRouterItemGetAttachmentResult)(nil)).Elem()
}
// the value of the attachment
func (o WirelessRouterItemGetAttachmentResultOutput) Value() pulumi.StringOutput {
return o.ApplyT(func(v WirelessRouterItemGetAttachmentResult) string { return v.Value }).(pulumi.StringOutput)
}
type WirelessRouterItemInput interface {
pulumi.Input
ToWirelessRouterItemOutput() WirelessRouterItemOutput
ToWirelessRouterItemOutputWithContext(ctx context.Context) WirelessRouterItemOutput
}
func (*WirelessRouterItem) ElementType() reflect.Type {
return reflect.TypeOf((**WirelessRouterItem)(nil)).Elem()
}
func (i *WirelessRouterItem) ToWirelessRouterItemOutput() WirelessRouterItemOutput {
return i.ToWirelessRouterItemOutputWithContext(context.Background())
}
func (i *WirelessRouterItem) ToWirelessRouterItemOutputWithContext(ctx context.Context) WirelessRouterItemOutput {
return pulumi.ToOutputWithContext(ctx, i).(WirelessRouterItemOutput)
}
// WirelessRouterItemArrayInput is an input type that accepts WirelessRouterItemArray and WirelessRouterItemArrayOutput values.
// You can construct a concrete instance of `WirelessRouterItemArrayInput` via:
//
// WirelessRouterItemArray{ WirelessRouterItemArgs{...} }
type WirelessRouterItemArrayInput interface {
pulumi.Input
ToWirelessRouterItemArrayOutput() WirelessRouterItemArrayOutput
ToWirelessRouterItemArrayOutputWithContext(context.Context) WirelessRouterItemArrayOutput
}
type WirelessRouterItemArray []WirelessRouterItemInput
func (WirelessRouterItemArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*WirelessRouterItem)(nil)).Elem()
}
func (i WirelessRouterItemArray) ToWirelessRouterItemArrayOutput() WirelessRouterItemArrayOutput {
return i.ToWirelessRouterItemArrayOutputWithContext(context.Background())
}
func (i WirelessRouterItemArray) ToWirelessRouterItemArrayOutputWithContext(ctx context.Context) WirelessRouterItemArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(WirelessRouterItemArrayOutput)
}
// WirelessRouterItemMapInput is an input type that accepts WirelessRouterItemMap and WirelessRouterItemMapOutput values.
// You can construct a concrete instance of `WirelessRouterItemMapInput` via:
//
// WirelessRouterItemMap{ "key": WirelessRouterItemArgs{...} }
type WirelessRouterItemMapInput interface {
pulumi.Input
ToWirelessRouterItemMapOutput() WirelessRouterItemMapOutput
ToWirelessRouterItemMapOutputWithContext(context.Context) WirelessRouterItemMapOutput
}
type WirelessRouterItemMap map[string]WirelessRouterItemInput
func (WirelessRouterItemMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*WirelessRouterItem)(nil)).Elem()
}
func (i WirelessRouterItemMap) ToWirelessRouterItemMapOutput() WirelessRouterItemMapOutput {
return i.ToWirelessRouterItemMapOutputWithContext(context.Background())
}
func (i WirelessRouterItemMap) ToWirelessRouterItemMapOutputWithContext(ctx context.Context) WirelessRouterItemMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(WirelessRouterItemMapOutput)
}
type WirelessRouterItemOutput struct{ *pulumi.OutputState }
func (WirelessRouterItemOutput) ElementType() reflect.Type {
return reflect.TypeOf((**WirelessRouterItem)(nil)).Elem()
}
func (o WirelessRouterItemOutput) ToWirelessRouterItemOutput() WirelessRouterItemOutput {
return o
}
func (o WirelessRouterItemOutput) ToWirelessRouterItemOutputWithContext(ctx context.Context) WirelessRouterItemOutput {
return o
}
type WirelessRouterItemArrayOutput struct{ *pulumi.OutputState }
func (WirelessRouterItemArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*WirelessRouterItem)(nil)).Elem()
}
func (o WirelessRouterItemArrayOutput) ToWirelessRouterItemArrayOutput() WirelessRouterItemArrayOutput {
return o
}
func (o WirelessRouterItemArrayOutput) ToWirelessRouterItemArrayOutputWithContext(ctx context.Context) WirelessRouterItemArrayOutput {
return o
}
func (o WirelessRouterItemArrayOutput) Index(i pulumi.IntInput) WirelessRouterItemOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *WirelessRouterItem {
return vs[0].([]*WirelessRouterItem)[vs[1].(int)]
}).(WirelessRouterItemOutput)
}
type WirelessRouterItemMapOutput struct{ *pulumi.OutputState }
func (WirelessRouterItemMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*WirelessRouterItem)(nil)).Elem()
}
func (o WirelessRouterItemMapOutput) ToWirelessRouterItemMapOutput() WirelessRouterItemMapOutput {
return o
}
func (o WirelessRouterItemMapOutput) ToWirelessRouterItemMapOutputWithContext(ctx context.Context) WirelessRouterItemMapOutput {
return o
}
func (o WirelessRouterItemMapOutput) MapIndex(k pulumi.StringInput) WirelessRouterItemOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *WirelessRouterItem {
return vs[0].(map[string]*WirelessRouterItem)[vs[1].(string)]
}).(WirelessRouterItemOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*WirelessRouterItemInput)(nil)).Elem(), &WirelessRouterItem{})
pulumi.RegisterInputType(reflect.TypeOf((*WirelessRouterItemArrayInput)(nil)).Elem(), WirelessRouterItemArray{})
pulumi.RegisterInputType(reflect.TypeOf((*WirelessRouterItemMapInput)(nil)).Elem(), WirelessRouterItemMap{})
pulumi.RegisterOutputType(WirelessRouterItemOutput{})
pulumi.RegisterOutputType(WirelessRouterItemGetAttachmentResultOutput{})
pulumi.RegisterOutputType(WirelessRouterItemArrayOutput{})
pulumi.RegisterOutputType(WirelessRouterItemMapOutput{})
}