generated from pulumi/pulumi-tf-provider-boilerplate
/
contactGroup.go
273 lines (222 loc) · 9.64 KB
/
contactGroup.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
// 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 statuscake
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type ContactGroup struct {
pulumi.CustomResourceState
// List of email addresses
EmailAddresses pulumi.StringArrayOutput `pulumi:"emailAddresses"`
// List of integration IDs
Integrations pulumi.StringArrayOutput `pulumi:"integrations"`
// List of international format mobile phone numbers
MobileNumbers pulumi.StringArrayOutput `pulumi:"mobileNumbers"`
// Name of the contact group
Name pulumi.StringOutput `pulumi:"name"`
// URL or IP address of an endpoint to push uptime events. Currently this only supports HTTP GET endpoints
PingUrl pulumi.StringPtrOutput `pulumi:"pingUrl"`
}
// NewContactGroup registers a new resource with the given unique name, arguments, and options.
func NewContactGroup(ctx *pulumi.Context,
name string, args *ContactGroupArgs, opts ...pulumi.ResourceOption) (*ContactGroup, error) {
if args == nil {
args = &ContactGroupArgs{}
}
opts = pkgResourceDefaultOpts(opts)
var resource ContactGroup
err := ctx.RegisterResource("statuscake:index/contactGroup:ContactGroup", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetContactGroup gets an existing ContactGroup 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 GetContactGroup(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ContactGroupState, opts ...pulumi.ResourceOption) (*ContactGroup, error) {
var resource ContactGroup
err := ctx.ReadResource("statuscake:index/contactGroup:ContactGroup", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ContactGroup resources.
type contactGroupState struct {
// List of email addresses
EmailAddresses []string `pulumi:"emailAddresses"`
// List of integration IDs
Integrations []string `pulumi:"integrations"`
// List of international format mobile phone numbers
MobileNumbers []string `pulumi:"mobileNumbers"`
// Name of the contact group
Name *string `pulumi:"name"`
// URL or IP address of an endpoint to push uptime events. Currently this only supports HTTP GET endpoints
PingUrl *string `pulumi:"pingUrl"`
}
type ContactGroupState struct {
// List of email addresses
EmailAddresses pulumi.StringArrayInput
// List of integration IDs
Integrations pulumi.StringArrayInput
// List of international format mobile phone numbers
MobileNumbers pulumi.StringArrayInput
// Name of the contact group
Name pulumi.StringPtrInput
// URL or IP address of an endpoint to push uptime events. Currently this only supports HTTP GET endpoints
PingUrl pulumi.StringPtrInput
}
func (ContactGroupState) ElementType() reflect.Type {
return reflect.TypeOf((*contactGroupState)(nil)).Elem()
}
type contactGroupArgs struct {
// List of email addresses
EmailAddresses []string `pulumi:"emailAddresses"`
// List of integration IDs
Integrations []string `pulumi:"integrations"`
// List of international format mobile phone numbers
MobileNumbers []string `pulumi:"mobileNumbers"`
// Name of the contact group
Name *string `pulumi:"name"`
// URL or IP address of an endpoint to push uptime events. Currently this only supports HTTP GET endpoints
PingUrl *string `pulumi:"pingUrl"`
}
// The set of arguments for constructing a ContactGroup resource.
type ContactGroupArgs struct {
// List of email addresses
EmailAddresses pulumi.StringArrayInput
// List of integration IDs
Integrations pulumi.StringArrayInput
// List of international format mobile phone numbers
MobileNumbers pulumi.StringArrayInput
// Name of the contact group
Name pulumi.StringPtrInput
// URL or IP address of an endpoint to push uptime events. Currently this only supports HTTP GET endpoints
PingUrl pulumi.StringPtrInput
}
func (ContactGroupArgs) ElementType() reflect.Type {
return reflect.TypeOf((*contactGroupArgs)(nil)).Elem()
}
type ContactGroupInput interface {
pulumi.Input
ToContactGroupOutput() ContactGroupOutput
ToContactGroupOutputWithContext(ctx context.Context) ContactGroupOutput
}
func (*ContactGroup) ElementType() reflect.Type {
return reflect.TypeOf((**ContactGroup)(nil)).Elem()
}
func (i *ContactGroup) ToContactGroupOutput() ContactGroupOutput {
return i.ToContactGroupOutputWithContext(context.Background())
}
func (i *ContactGroup) ToContactGroupOutputWithContext(ctx context.Context) ContactGroupOutput {
return pulumi.ToOutputWithContext(ctx, i).(ContactGroupOutput)
}
// ContactGroupArrayInput is an input type that accepts ContactGroupArray and ContactGroupArrayOutput values.
// You can construct a concrete instance of `ContactGroupArrayInput` via:
//
// ContactGroupArray{ ContactGroupArgs{...} }
type ContactGroupArrayInput interface {
pulumi.Input
ToContactGroupArrayOutput() ContactGroupArrayOutput
ToContactGroupArrayOutputWithContext(context.Context) ContactGroupArrayOutput
}
type ContactGroupArray []ContactGroupInput
func (ContactGroupArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ContactGroup)(nil)).Elem()
}
func (i ContactGroupArray) ToContactGroupArrayOutput() ContactGroupArrayOutput {
return i.ToContactGroupArrayOutputWithContext(context.Background())
}
func (i ContactGroupArray) ToContactGroupArrayOutputWithContext(ctx context.Context) ContactGroupArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ContactGroupArrayOutput)
}
// ContactGroupMapInput is an input type that accepts ContactGroupMap and ContactGroupMapOutput values.
// You can construct a concrete instance of `ContactGroupMapInput` via:
//
// ContactGroupMap{ "key": ContactGroupArgs{...} }
type ContactGroupMapInput interface {
pulumi.Input
ToContactGroupMapOutput() ContactGroupMapOutput
ToContactGroupMapOutputWithContext(context.Context) ContactGroupMapOutput
}
type ContactGroupMap map[string]ContactGroupInput
func (ContactGroupMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ContactGroup)(nil)).Elem()
}
func (i ContactGroupMap) ToContactGroupMapOutput() ContactGroupMapOutput {
return i.ToContactGroupMapOutputWithContext(context.Background())
}
func (i ContactGroupMap) ToContactGroupMapOutputWithContext(ctx context.Context) ContactGroupMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ContactGroupMapOutput)
}
type ContactGroupOutput struct{ *pulumi.OutputState }
func (ContactGroupOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ContactGroup)(nil)).Elem()
}
func (o ContactGroupOutput) ToContactGroupOutput() ContactGroupOutput {
return o
}
func (o ContactGroupOutput) ToContactGroupOutputWithContext(ctx context.Context) ContactGroupOutput {
return o
}
// List of email addresses
func (o ContactGroupOutput) EmailAddresses() pulumi.StringArrayOutput {
return o.ApplyT(func(v *ContactGroup) pulumi.StringArrayOutput { return v.EmailAddresses }).(pulumi.StringArrayOutput)
}
// List of integration IDs
func (o ContactGroupOutput) Integrations() pulumi.StringArrayOutput {
return o.ApplyT(func(v *ContactGroup) pulumi.StringArrayOutput { return v.Integrations }).(pulumi.StringArrayOutput)
}
// List of international format mobile phone numbers
func (o ContactGroupOutput) MobileNumbers() pulumi.StringArrayOutput {
return o.ApplyT(func(v *ContactGroup) pulumi.StringArrayOutput { return v.MobileNumbers }).(pulumi.StringArrayOutput)
}
// Name of the contact group
func (o ContactGroupOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ContactGroup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// URL or IP address of an endpoint to push uptime events. Currently this only supports HTTP GET endpoints
func (o ContactGroupOutput) PingUrl() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ContactGroup) pulumi.StringPtrOutput { return v.PingUrl }).(pulumi.StringPtrOutput)
}
type ContactGroupArrayOutput struct{ *pulumi.OutputState }
func (ContactGroupArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ContactGroup)(nil)).Elem()
}
func (o ContactGroupArrayOutput) ToContactGroupArrayOutput() ContactGroupArrayOutput {
return o
}
func (o ContactGroupArrayOutput) ToContactGroupArrayOutputWithContext(ctx context.Context) ContactGroupArrayOutput {
return o
}
func (o ContactGroupArrayOutput) Index(i pulumi.IntInput) ContactGroupOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ContactGroup {
return vs[0].([]*ContactGroup)[vs[1].(int)]
}).(ContactGroupOutput)
}
type ContactGroupMapOutput struct{ *pulumi.OutputState }
func (ContactGroupMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ContactGroup)(nil)).Elem()
}
func (o ContactGroupMapOutput) ToContactGroupMapOutput() ContactGroupMapOutput {
return o
}
func (o ContactGroupMapOutput) ToContactGroupMapOutputWithContext(ctx context.Context) ContactGroupMapOutput {
return o
}
func (o ContactGroupMapOutput) MapIndex(k pulumi.StringInput) ContactGroupOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ContactGroup {
return vs[0].(map[string]*ContactGroup)[vs[1].(string)]
}).(ContactGroupOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ContactGroupInput)(nil)).Elem(), &ContactGroup{})
pulumi.RegisterInputType(reflect.TypeOf((*ContactGroupArrayInput)(nil)).Elem(), ContactGroupArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ContactGroupMapInput)(nil)).Elem(), ContactGroupMap{})
pulumi.RegisterOutputType(ContactGroupOutput{})
pulumi.RegisterOutputType(ContactGroupArrayOutput{})
pulumi.RegisterOutputType(ContactGroupMapOutput{})
}