generated from pulumi/pulumi-tf-provider-boilerplate
/
mscSubContract.go
315 lines (265 loc) · 10.9 KB
/
mscSubContract.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
// 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 alicloud
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Provides a Msc Sub Contact resource.
//
// > **NOTE:** Available in v1.132.0+.
//
// ## Example Usage
//
// # Basic Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// "github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := alicloud.NewMscSubContract(ctx, "default", &alicloud.MscSubContractArgs{
// ContactName: pulumi.Any(example_value),
// Position: pulumi.String("CEO"),
// Email: pulumi.String("123@163.com"),
// Mobile: pulumi.String("153xxxxx906"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Msc Sub Contact can be imported using the id, e.g.
//
// ```sh
//
// $ pulumi import alicloud:index/mscSubContract:MscSubContract example <id>
//
// ```
type MscSubContract struct {
pulumi.CustomResourceState
// The User's Contact Name. **Note:** The name must be 2 to 12 characters in length.
ContactName pulumi.StringOutput `pulumi:"contactName"`
// The User's Contact Email Address.
Email pulumi.StringOutput `pulumi:"email"`
// The User's Telephone.
Mobile pulumi.StringOutput `pulumi:"mobile"`
// The User's Position. Valid values: `CEO`, `Technical Director`, `Maintenance Director`, `Project Director`,`Finance Director` and `Other`.
Position pulumi.StringOutput `pulumi:"position"`
}
// NewMscSubContract registers a new resource with the given unique name, arguments, and options.
func NewMscSubContract(ctx *pulumi.Context,
name string, args *MscSubContractArgs, opts ...pulumi.ResourceOption) (*MscSubContract, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ContactName == nil {
return nil, errors.New("invalid value for required argument 'ContactName'")
}
if args.Email == nil {
return nil, errors.New("invalid value for required argument 'Email'")
}
if args.Mobile == nil {
return nil, errors.New("invalid value for required argument 'Mobile'")
}
if args.Position == nil {
return nil, errors.New("invalid value for required argument 'Position'")
}
opts = pkgResourceDefaultOpts(opts)
var resource MscSubContract
err := ctx.RegisterResource("alicloud:index/mscSubContract:MscSubContract", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetMscSubContract gets an existing MscSubContract 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 GetMscSubContract(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *MscSubContractState, opts ...pulumi.ResourceOption) (*MscSubContract, error) {
var resource MscSubContract
err := ctx.ReadResource("alicloud:index/mscSubContract:MscSubContract", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering MscSubContract resources.
type mscSubContractState struct {
// The User's Contact Name. **Note:** The name must be 2 to 12 characters in length.
ContactName *string `pulumi:"contactName"`
// The User's Contact Email Address.
Email *string `pulumi:"email"`
// The User's Telephone.
Mobile *string `pulumi:"mobile"`
// The User's Position. Valid values: `CEO`, `Technical Director`, `Maintenance Director`, `Project Director`,`Finance Director` and `Other`.
Position *string `pulumi:"position"`
}
type MscSubContractState struct {
// The User's Contact Name. **Note:** The name must be 2 to 12 characters in length.
ContactName pulumi.StringPtrInput
// The User's Contact Email Address.
Email pulumi.StringPtrInput
// The User's Telephone.
Mobile pulumi.StringPtrInput
// The User's Position. Valid values: `CEO`, `Technical Director`, `Maintenance Director`, `Project Director`,`Finance Director` and `Other`.
Position pulumi.StringPtrInput
}
func (MscSubContractState) ElementType() reflect.Type {
return reflect.TypeOf((*mscSubContractState)(nil)).Elem()
}
type mscSubContractArgs struct {
// The User's Contact Name. **Note:** The name must be 2 to 12 characters in length.
ContactName string `pulumi:"contactName"`
// The User's Contact Email Address.
Email string `pulumi:"email"`
// The User's Telephone.
Mobile string `pulumi:"mobile"`
// The User's Position. Valid values: `CEO`, `Technical Director`, `Maintenance Director`, `Project Director`,`Finance Director` and `Other`.
Position string `pulumi:"position"`
}
// The set of arguments for constructing a MscSubContract resource.
type MscSubContractArgs struct {
// The User's Contact Name. **Note:** The name must be 2 to 12 characters in length.
ContactName pulumi.StringInput
// The User's Contact Email Address.
Email pulumi.StringInput
// The User's Telephone.
Mobile pulumi.StringInput
// The User's Position. Valid values: `CEO`, `Technical Director`, `Maintenance Director`, `Project Director`,`Finance Director` and `Other`.
Position pulumi.StringInput
}
func (MscSubContractArgs) ElementType() reflect.Type {
return reflect.TypeOf((*mscSubContractArgs)(nil)).Elem()
}
type MscSubContractInput interface {
pulumi.Input
ToMscSubContractOutput() MscSubContractOutput
ToMscSubContractOutputWithContext(ctx context.Context) MscSubContractOutput
}
func (*MscSubContract) ElementType() reflect.Type {
return reflect.TypeOf((**MscSubContract)(nil)).Elem()
}
func (i *MscSubContract) ToMscSubContractOutput() MscSubContractOutput {
return i.ToMscSubContractOutputWithContext(context.Background())
}
func (i *MscSubContract) ToMscSubContractOutputWithContext(ctx context.Context) MscSubContractOutput {
return pulumi.ToOutputWithContext(ctx, i).(MscSubContractOutput)
}
// MscSubContractArrayInput is an input type that accepts MscSubContractArray and MscSubContractArrayOutput values.
// You can construct a concrete instance of `MscSubContractArrayInput` via:
//
// MscSubContractArray{ MscSubContractArgs{...} }
type MscSubContractArrayInput interface {
pulumi.Input
ToMscSubContractArrayOutput() MscSubContractArrayOutput
ToMscSubContractArrayOutputWithContext(context.Context) MscSubContractArrayOutput
}
type MscSubContractArray []MscSubContractInput
func (MscSubContractArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*MscSubContract)(nil)).Elem()
}
func (i MscSubContractArray) ToMscSubContractArrayOutput() MscSubContractArrayOutput {
return i.ToMscSubContractArrayOutputWithContext(context.Background())
}
func (i MscSubContractArray) ToMscSubContractArrayOutputWithContext(ctx context.Context) MscSubContractArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(MscSubContractArrayOutput)
}
// MscSubContractMapInput is an input type that accepts MscSubContractMap and MscSubContractMapOutput values.
// You can construct a concrete instance of `MscSubContractMapInput` via:
//
// MscSubContractMap{ "key": MscSubContractArgs{...} }
type MscSubContractMapInput interface {
pulumi.Input
ToMscSubContractMapOutput() MscSubContractMapOutput
ToMscSubContractMapOutputWithContext(context.Context) MscSubContractMapOutput
}
type MscSubContractMap map[string]MscSubContractInput
func (MscSubContractMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*MscSubContract)(nil)).Elem()
}
func (i MscSubContractMap) ToMscSubContractMapOutput() MscSubContractMapOutput {
return i.ToMscSubContractMapOutputWithContext(context.Background())
}
func (i MscSubContractMap) ToMscSubContractMapOutputWithContext(ctx context.Context) MscSubContractMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(MscSubContractMapOutput)
}
type MscSubContractOutput struct{ *pulumi.OutputState }
func (MscSubContractOutput) ElementType() reflect.Type {
return reflect.TypeOf((**MscSubContract)(nil)).Elem()
}
func (o MscSubContractOutput) ToMscSubContractOutput() MscSubContractOutput {
return o
}
func (o MscSubContractOutput) ToMscSubContractOutputWithContext(ctx context.Context) MscSubContractOutput {
return o
}
// The User's Contact Name. **Note:** The name must be 2 to 12 characters in length.
func (o MscSubContractOutput) ContactName() pulumi.StringOutput {
return o.ApplyT(func(v *MscSubContract) pulumi.StringOutput { return v.ContactName }).(pulumi.StringOutput)
}
// The User's Contact Email Address.
func (o MscSubContractOutput) Email() pulumi.StringOutput {
return o.ApplyT(func(v *MscSubContract) pulumi.StringOutput { return v.Email }).(pulumi.StringOutput)
}
// The User's Telephone.
func (o MscSubContractOutput) Mobile() pulumi.StringOutput {
return o.ApplyT(func(v *MscSubContract) pulumi.StringOutput { return v.Mobile }).(pulumi.StringOutput)
}
// The User's Position. Valid values: `CEO`, `Technical Director`, `Maintenance Director`, `Project Director`,`Finance Director` and `Other`.
func (o MscSubContractOutput) Position() pulumi.StringOutput {
return o.ApplyT(func(v *MscSubContract) pulumi.StringOutput { return v.Position }).(pulumi.StringOutput)
}
type MscSubContractArrayOutput struct{ *pulumi.OutputState }
func (MscSubContractArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*MscSubContract)(nil)).Elem()
}
func (o MscSubContractArrayOutput) ToMscSubContractArrayOutput() MscSubContractArrayOutput {
return o
}
func (o MscSubContractArrayOutput) ToMscSubContractArrayOutputWithContext(ctx context.Context) MscSubContractArrayOutput {
return o
}
func (o MscSubContractArrayOutput) Index(i pulumi.IntInput) MscSubContractOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *MscSubContract {
return vs[0].([]*MscSubContract)[vs[1].(int)]
}).(MscSubContractOutput)
}
type MscSubContractMapOutput struct{ *pulumi.OutputState }
func (MscSubContractMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*MscSubContract)(nil)).Elem()
}
func (o MscSubContractMapOutput) ToMscSubContractMapOutput() MscSubContractMapOutput {
return o
}
func (o MscSubContractMapOutput) ToMscSubContractMapOutputWithContext(ctx context.Context) MscSubContractMapOutput {
return o
}
func (o MscSubContractMapOutput) MapIndex(k pulumi.StringInput) MscSubContractOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *MscSubContract {
return vs[0].(map[string]*MscSubContract)[vs[1].(string)]
}).(MscSubContractOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*MscSubContractInput)(nil)).Elem(), &MscSubContract{})
pulumi.RegisterInputType(reflect.TypeOf((*MscSubContractArrayInput)(nil)).Elem(), MscSubContractArray{})
pulumi.RegisterInputType(reflect.TypeOf((*MscSubContractMapInput)(nil)).Elem(), MscSubContractMap{})
pulumi.RegisterOutputType(MscSubContractOutput{})
pulumi.RegisterOutputType(MscSubContractArrayOutput{})
pulumi.RegisterOutputType(MscSubContractMapOutput{})
}