generated from pulumi/pulumi-tf-provider-boilerplate
/
bindingObject.go
236 lines (188 loc) · 8.17 KB
/
bindingObject.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
// 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 deprecatedmonitor
import (
"context"
"reflect"
"errors"
"github.com/mergtil/pulumi-tencentcloud/sdk/go/tencentcloud/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type BindingObject struct {
pulumi.CustomResourceState
// A list objects. Each element contains the following attributes:
Dimensions BindingObjectDimensionArrayOutput `pulumi:"dimensions"`
// Policy group ID for binding objects.
GroupId pulumi.IntOutput `pulumi:"groupId"`
}
// NewBindingObject registers a new resource with the given unique name, arguments, and options.
func NewBindingObject(ctx *pulumi.Context,
name string, args *BindingObjectArgs, opts ...pulumi.ResourceOption) (*BindingObject, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Dimensions == nil {
return nil, errors.New("invalid value for required argument 'Dimensions'")
}
if args.GroupId == nil {
return nil, errors.New("invalid value for required argument 'GroupId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource BindingObject
err := ctx.RegisterResource("tencentcloud:Deprecatedmonitor/bindingObject:BindingObject", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetBindingObject gets an existing BindingObject 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 GetBindingObject(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *BindingObjectState, opts ...pulumi.ResourceOption) (*BindingObject, error) {
var resource BindingObject
err := ctx.ReadResource("tencentcloud:Deprecatedmonitor/bindingObject:BindingObject", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering BindingObject resources.
type bindingObjectState struct {
// A list objects. Each element contains the following attributes:
Dimensions []BindingObjectDimension `pulumi:"dimensions"`
// Policy group ID for binding objects.
GroupId *int `pulumi:"groupId"`
}
type BindingObjectState struct {
// A list objects. Each element contains the following attributes:
Dimensions BindingObjectDimensionArrayInput
// Policy group ID for binding objects.
GroupId pulumi.IntPtrInput
}
func (BindingObjectState) ElementType() reflect.Type {
return reflect.TypeOf((*bindingObjectState)(nil)).Elem()
}
type bindingObjectArgs struct {
// A list objects. Each element contains the following attributes:
Dimensions []BindingObjectDimension `pulumi:"dimensions"`
// Policy group ID for binding objects.
GroupId int `pulumi:"groupId"`
}
// The set of arguments for constructing a BindingObject resource.
type BindingObjectArgs struct {
// A list objects. Each element contains the following attributes:
Dimensions BindingObjectDimensionArrayInput
// Policy group ID for binding objects.
GroupId pulumi.IntInput
}
func (BindingObjectArgs) ElementType() reflect.Type {
return reflect.TypeOf((*bindingObjectArgs)(nil)).Elem()
}
type BindingObjectInput interface {
pulumi.Input
ToBindingObjectOutput() BindingObjectOutput
ToBindingObjectOutputWithContext(ctx context.Context) BindingObjectOutput
}
func (*BindingObject) ElementType() reflect.Type {
return reflect.TypeOf((**BindingObject)(nil)).Elem()
}
func (i *BindingObject) ToBindingObjectOutput() BindingObjectOutput {
return i.ToBindingObjectOutputWithContext(context.Background())
}
func (i *BindingObject) ToBindingObjectOutputWithContext(ctx context.Context) BindingObjectOutput {
return pulumi.ToOutputWithContext(ctx, i).(BindingObjectOutput)
}
// BindingObjectArrayInput is an input type that accepts BindingObjectArray and BindingObjectArrayOutput values.
// You can construct a concrete instance of `BindingObjectArrayInput` via:
//
// BindingObjectArray{ BindingObjectArgs{...} }
type BindingObjectArrayInput interface {
pulumi.Input
ToBindingObjectArrayOutput() BindingObjectArrayOutput
ToBindingObjectArrayOutputWithContext(context.Context) BindingObjectArrayOutput
}
type BindingObjectArray []BindingObjectInput
func (BindingObjectArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*BindingObject)(nil)).Elem()
}
func (i BindingObjectArray) ToBindingObjectArrayOutput() BindingObjectArrayOutput {
return i.ToBindingObjectArrayOutputWithContext(context.Background())
}
func (i BindingObjectArray) ToBindingObjectArrayOutputWithContext(ctx context.Context) BindingObjectArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(BindingObjectArrayOutput)
}
// BindingObjectMapInput is an input type that accepts BindingObjectMap and BindingObjectMapOutput values.
// You can construct a concrete instance of `BindingObjectMapInput` via:
//
// BindingObjectMap{ "key": BindingObjectArgs{...} }
type BindingObjectMapInput interface {
pulumi.Input
ToBindingObjectMapOutput() BindingObjectMapOutput
ToBindingObjectMapOutputWithContext(context.Context) BindingObjectMapOutput
}
type BindingObjectMap map[string]BindingObjectInput
func (BindingObjectMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*BindingObject)(nil)).Elem()
}
func (i BindingObjectMap) ToBindingObjectMapOutput() BindingObjectMapOutput {
return i.ToBindingObjectMapOutputWithContext(context.Background())
}
func (i BindingObjectMap) ToBindingObjectMapOutputWithContext(ctx context.Context) BindingObjectMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(BindingObjectMapOutput)
}
type BindingObjectOutput struct{ *pulumi.OutputState }
func (BindingObjectOutput) ElementType() reflect.Type {
return reflect.TypeOf((**BindingObject)(nil)).Elem()
}
func (o BindingObjectOutput) ToBindingObjectOutput() BindingObjectOutput {
return o
}
func (o BindingObjectOutput) ToBindingObjectOutputWithContext(ctx context.Context) BindingObjectOutput {
return o
}
// A list objects. Each element contains the following attributes:
func (o BindingObjectOutput) Dimensions() BindingObjectDimensionArrayOutput {
return o.ApplyT(func(v *BindingObject) BindingObjectDimensionArrayOutput { return v.Dimensions }).(BindingObjectDimensionArrayOutput)
}
// Policy group ID for binding objects.
func (o BindingObjectOutput) GroupId() pulumi.IntOutput {
return o.ApplyT(func(v *BindingObject) pulumi.IntOutput { return v.GroupId }).(pulumi.IntOutput)
}
type BindingObjectArrayOutput struct{ *pulumi.OutputState }
func (BindingObjectArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*BindingObject)(nil)).Elem()
}
func (o BindingObjectArrayOutput) ToBindingObjectArrayOutput() BindingObjectArrayOutput {
return o
}
func (o BindingObjectArrayOutput) ToBindingObjectArrayOutputWithContext(ctx context.Context) BindingObjectArrayOutput {
return o
}
func (o BindingObjectArrayOutput) Index(i pulumi.IntInput) BindingObjectOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *BindingObject {
return vs[0].([]*BindingObject)[vs[1].(int)]
}).(BindingObjectOutput)
}
type BindingObjectMapOutput struct{ *pulumi.OutputState }
func (BindingObjectMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*BindingObject)(nil)).Elem()
}
func (o BindingObjectMapOutput) ToBindingObjectMapOutput() BindingObjectMapOutput {
return o
}
func (o BindingObjectMapOutput) ToBindingObjectMapOutputWithContext(ctx context.Context) BindingObjectMapOutput {
return o
}
func (o BindingObjectMapOutput) MapIndex(k pulumi.StringInput) BindingObjectOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *BindingObject {
return vs[0].(map[string]*BindingObject)[vs[1].(string)]
}).(BindingObjectOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*BindingObjectInput)(nil)).Elem(), &BindingObject{})
pulumi.RegisterInputType(reflect.TypeOf((*BindingObjectArrayInput)(nil)).Elem(), BindingObjectArray{})
pulumi.RegisterInputType(reflect.TypeOf((*BindingObjectMapInput)(nil)).Elem(), BindingObjectMap{})
pulumi.RegisterOutputType(BindingObjectOutput{})
pulumi.RegisterOutputType(BindingObjectArrayOutput{})
pulumi.RegisterOutputType(BindingObjectMapOutput{})
}