/
devicedetectionportal.go
297 lines (246 loc) · 12 KB
/
devicedetectionportal.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
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package replacemsg
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-fortios/sdk/go/fortios/internal"
)
// Replacement messages. Applies to FortiOS Version `<= 6.4.1`.
//
// ## Import
//
// SystemReplacemsg DeviceDetectionPortal can be imported using any of these accepted formats:
//
// ```sh
// $ pulumi import fortios:system/replacemsg/devicedetectionportal:Devicedetectionportal labelname {{msg_type}}
// ```
//
// If you do not want to import arguments of block:
//
// $ export "FORTIOS_IMPORT_TABLE"="false"
//
// ```sh
// $ pulumi import fortios:system/replacemsg/devicedetectionportal:Devicedetectionportal labelname {{msg_type}}
// ```
//
// $ unset "FORTIOS_IMPORT_TABLE"
type Devicedetectionportal struct {
pulumi.CustomResourceState
// Message string.
Buffer pulumi.StringPtrOutput `pulumi:"buffer"`
// Format flag.
Format pulumi.StringOutput `pulumi:"format"`
// Header flag. Valid values: `none`, `http`, `8bit`.
Header pulumi.StringOutput `pulumi:"header"`
// Message type.
MsgType pulumi.StringOutput `pulumi:"msgType"`
// Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
Vdomparam pulumi.StringPtrOutput `pulumi:"vdomparam"`
}
// NewDevicedetectionportal registers a new resource with the given unique name, arguments, and options.
func NewDevicedetectionportal(ctx *pulumi.Context,
name string, args *DevicedetectionportalArgs, opts ...pulumi.ResourceOption) (*Devicedetectionportal, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.MsgType == nil {
return nil, errors.New("invalid value for required argument 'MsgType'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Devicedetectionportal
err := ctx.RegisterResource("fortios:system/replacemsg/devicedetectionportal:Devicedetectionportal", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDevicedetectionportal gets an existing Devicedetectionportal 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 GetDevicedetectionportal(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DevicedetectionportalState, opts ...pulumi.ResourceOption) (*Devicedetectionportal, error) {
var resource Devicedetectionportal
err := ctx.ReadResource("fortios:system/replacemsg/devicedetectionportal:Devicedetectionportal", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Devicedetectionportal resources.
type devicedetectionportalState struct {
// Message string.
Buffer *string `pulumi:"buffer"`
// Format flag.
Format *string `pulumi:"format"`
// Header flag. Valid values: `none`, `http`, `8bit`.
Header *string `pulumi:"header"`
// Message type.
MsgType *string `pulumi:"msgType"`
// Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
Vdomparam *string `pulumi:"vdomparam"`
}
type DevicedetectionportalState struct {
// Message string.
Buffer pulumi.StringPtrInput
// Format flag.
Format pulumi.StringPtrInput
// Header flag. Valid values: `none`, `http`, `8bit`.
Header pulumi.StringPtrInput
// Message type.
MsgType pulumi.StringPtrInput
// Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
Vdomparam pulumi.StringPtrInput
}
func (DevicedetectionportalState) ElementType() reflect.Type {
return reflect.TypeOf((*devicedetectionportalState)(nil)).Elem()
}
type devicedetectionportalArgs struct {
// Message string.
Buffer *string `pulumi:"buffer"`
// Format flag.
Format *string `pulumi:"format"`
// Header flag. Valid values: `none`, `http`, `8bit`.
Header *string `pulumi:"header"`
// Message type.
MsgType string `pulumi:"msgType"`
// Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
Vdomparam *string `pulumi:"vdomparam"`
}
// The set of arguments for constructing a Devicedetectionportal resource.
type DevicedetectionportalArgs struct {
// Message string.
Buffer pulumi.StringPtrInput
// Format flag.
Format pulumi.StringPtrInput
// Header flag. Valid values: `none`, `http`, `8bit`.
Header pulumi.StringPtrInput
// Message type.
MsgType pulumi.StringInput
// Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
Vdomparam pulumi.StringPtrInput
}
func (DevicedetectionportalArgs) ElementType() reflect.Type {
return reflect.TypeOf((*devicedetectionportalArgs)(nil)).Elem()
}
type DevicedetectionportalInput interface {
pulumi.Input
ToDevicedetectionportalOutput() DevicedetectionportalOutput
ToDevicedetectionportalOutputWithContext(ctx context.Context) DevicedetectionportalOutput
}
func (*Devicedetectionportal) ElementType() reflect.Type {
return reflect.TypeOf((**Devicedetectionportal)(nil)).Elem()
}
func (i *Devicedetectionportal) ToDevicedetectionportalOutput() DevicedetectionportalOutput {
return i.ToDevicedetectionportalOutputWithContext(context.Background())
}
func (i *Devicedetectionportal) ToDevicedetectionportalOutputWithContext(ctx context.Context) DevicedetectionportalOutput {
return pulumi.ToOutputWithContext(ctx, i).(DevicedetectionportalOutput)
}
// DevicedetectionportalArrayInput is an input type that accepts DevicedetectionportalArray and DevicedetectionportalArrayOutput values.
// You can construct a concrete instance of `DevicedetectionportalArrayInput` via:
//
// DevicedetectionportalArray{ DevicedetectionportalArgs{...} }
type DevicedetectionportalArrayInput interface {
pulumi.Input
ToDevicedetectionportalArrayOutput() DevicedetectionportalArrayOutput
ToDevicedetectionportalArrayOutputWithContext(context.Context) DevicedetectionportalArrayOutput
}
type DevicedetectionportalArray []DevicedetectionportalInput
func (DevicedetectionportalArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Devicedetectionportal)(nil)).Elem()
}
func (i DevicedetectionportalArray) ToDevicedetectionportalArrayOutput() DevicedetectionportalArrayOutput {
return i.ToDevicedetectionportalArrayOutputWithContext(context.Background())
}
func (i DevicedetectionportalArray) ToDevicedetectionportalArrayOutputWithContext(ctx context.Context) DevicedetectionportalArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(DevicedetectionportalArrayOutput)
}
// DevicedetectionportalMapInput is an input type that accepts DevicedetectionportalMap and DevicedetectionportalMapOutput values.
// You can construct a concrete instance of `DevicedetectionportalMapInput` via:
//
// DevicedetectionportalMap{ "key": DevicedetectionportalArgs{...} }
type DevicedetectionportalMapInput interface {
pulumi.Input
ToDevicedetectionportalMapOutput() DevicedetectionportalMapOutput
ToDevicedetectionportalMapOutputWithContext(context.Context) DevicedetectionportalMapOutput
}
type DevicedetectionportalMap map[string]DevicedetectionportalInput
func (DevicedetectionportalMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Devicedetectionportal)(nil)).Elem()
}
func (i DevicedetectionportalMap) ToDevicedetectionportalMapOutput() DevicedetectionportalMapOutput {
return i.ToDevicedetectionportalMapOutputWithContext(context.Background())
}
func (i DevicedetectionportalMap) ToDevicedetectionportalMapOutputWithContext(ctx context.Context) DevicedetectionportalMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(DevicedetectionportalMapOutput)
}
type DevicedetectionportalOutput struct{ *pulumi.OutputState }
func (DevicedetectionportalOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Devicedetectionportal)(nil)).Elem()
}
func (o DevicedetectionportalOutput) ToDevicedetectionportalOutput() DevicedetectionportalOutput {
return o
}
func (o DevicedetectionportalOutput) ToDevicedetectionportalOutputWithContext(ctx context.Context) DevicedetectionportalOutput {
return o
}
// Message string.
func (o DevicedetectionportalOutput) Buffer() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Devicedetectionportal) pulumi.StringPtrOutput { return v.Buffer }).(pulumi.StringPtrOutput)
}
// Format flag.
func (o DevicedetectionportalOutput) Format() pulumi.StringOutput {
return o.ApplyT(func(v *Devicedetectionportal) pulumi.StringOutput { return v.Format }).(pulumi.StringOutput)
}
// Header flag. Valid values: `none`, `http`, `8bit`.
func (o DevicedetectionportalOutput) Header() pulumi.StringOutput {
return o.ApplyT(func(v *Devicedetectionportal) pulumi.StringOutput { return v.Header }).(pulumi.StringOutput)
}
// Message type.
func (o DevicedetectionportalOutput) MsgType() pulumi.StringOutput {
return o.ApplyT(func(v *Devicedetectionportal) pulumi.StringOutput { return v.MsgType }).(pulumi.StringOutput)
}
// Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
func (o DevicedetectionportalOutput) Vdomparam() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Devicedetectionportal) pulumi.StringPtrOutput { return v.Vdomparam }).(pulumi.StringPtrOutput)
}
type DevicedetectionportalArrayOutput struct{ *pulumi.OutputState }
func (DevicedetectionportalArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Devicedetectionportal)(nil)).Elem()
}
func (o DevicedetectionportalArrayOutput) ToDevicedetectionportalArrayOutput() DevicedetectionportalArrayOutput {
return o
}
func (o DevicedetectionportalArrayOutput) ToDevicedetectionportalArrayOutputWithContext(ctx context.Context) DevicedetectionportalArrayOutput {
return o
}
func (o DevicedetectionportalArrayOutput) Index(i pulumi.IntInput) DevicedetectionportalOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Devicedetectionportal {
return vs[0].([]*Devicedetectionportal)[vs[1].(int)]
}).(DevicedetectionportalOutput)
}
type DevicedetectionportalMapOutput struct{ *pulumi.OutputState }
func (DevicedetectionportalMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Devicedetectionportal)(nil)).Elem()
}
func (o DevicedetectionportalMapOutput) ToDevicedetectionportalMapOutput() DevicedetectionportalMapOutput {
return o
}
func (o DevicedetectionportalMapOutput) ToDevicedetectionportalMapOutputWithContext(ctx context.Context) DevicedetectionportalMapOutput {
return o
}
func (o DevicedetectionportalMapOutput) MapIndex(k pulumi.StringInput) DevicedetectionportalOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Devicedetectionportal {
return vs[0].(map[string]*Devicedetectionportal)[vs[1].(string)]
}).(DevicedetectionportalOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*DevicedetectionportalInput)(nil)).Elem(), &Devicedetectionportal{})
pulumi.RegisterInputType(reflect.TypeOf((*DevicedetectionportalArrayInput)(nil)).Elem(), DevicedetectionportalArray{})
pulumi.RegisterInputType(reflect.TypeOf((*DevicedetectionportalMapInput)(nil)).Elem(), DevicedetectionportalMap{})
pulumi.RegisterOutputType(DevicedetectionportalOutput{})
pulumi.RegisterOutputType(DevicedetectionportalArrayOutput{})
pulumi.RegisterOutputType(DevicedetectionportalMapOutput{})
}