generated from pulumi/pulumi-tf-provider-boilerplate
/
legacyProjectRepository.go
237 lines (189 loc) · 9.04 KB
/
legacyProjectRepository.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
// 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 dbtcloud
import (
"context"
"reflect"
"errors"
"github.com/a-schot/pulumi-dbtcloud/sdk/go/dbtcloud/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Deprecated: Do not use! This resource is mapped from the legacy Terraform `dbt_cloud_`-prefixed resource/datasource
type LegacyProjectRepository struct {
pulumi.CustomResourceState
// Project ID
ProjectId pulumi.IntOutput `pulumi:"projectId"`
// Repository ID
RepositoryId pulumi.IntOutput `pulumi:"repositoryId"`
}
// NewLegacyProjectRepository registers a new resource with the given unique name, arguments, and options.
func NewLegacyProjectRepository(ctx *pulumi.Context,
name string, args *LegacyProjectRepositoryArgs, opts ...pulumi.ResourceOption) (*LegacyProjectRepository, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ProjectId == nil {
return nil, errors.New("invalid value for required argument 'ProjectId'")
}
if args.RepositoryId == nil {
return nil, errors.New("invalid value for required argument 'RepositoryId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource LegacyProjectRepository
err := ctx.RegisterResource("dbtcloud:index/legacyProjectRepository:LegacyProjectRepository", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetLegacyProjectRepository gets an existing LegacyProjectRepository 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 GetLegacyProjectRepository(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *LegacyProjectRepositoryState, opts ...pulumi.ResourceOption) (*LegacyProjectRepository, error) {
var resource LegacyProjectRepository
err := ctx.ReadResource("dbtcloud:index/legacyProjectRepository:LegacyProjectRepository", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering LegacyProjectRepository resources.
type legacyProjectRepositoryState struct {
// Project ID
ProjectId *int `pulumi:"projectId"`
// Repository ID
RepositoryId *int `pulumi:"repositoryId"`
}
type LegacyProjectRepositoryState struct {
// Project ID
ProjectId pulumi.IntPtrInput
// Repository ID
RepositoryId pulumi.IntPtrInput
}
func (LegacyProjectRepositoryState) ElementType() reflect.Type {
return reflect.TypeOf((*legacyProjectRepositoryState)(nil)).Elem()
}
type legacyProjectRepositoryArgs struct {
// Project ID
ProjectId int `pulumi:"projectId"`
// Repository ID
RepositoryId int `pulumi:"repositoryId"`
}
// The set of arguments for constructing a LegacyProjectRepository resource.
type LegacyProjectRepositoryArgs struct {
// Project ID
ProjectId pulumi.IntInput
// Repository ID
RepositoryId pulumi.IntInput
}
func (LegacyProjectRepositoryArgs) ElementType() reflect.Type {
return reflect.TypeOf((*legacyProjectRepositoryArgs)(nil)).Elem()
}
type LegacyProjectRepositoryInput interface {
pulumi.Input
ToLegacyProjectRepositoryOutput() LegacyProjectRepositoryOutput
ToLegacyProjectRepositoryOutputWithContext(ctx context.Context) LegacyProjectRepositoryOutput
}
func (*LegacyProjectRepository) ElementType() reflect.Type {
return reflect.TypeOf((**LegacyProjectRepository)(nil)).Elem()
}
func (i *LegacyProjectRepository) ToLegacyProjectRepositoryOutput() LegacyProjectRepositoryOutput {
return i.ToLegacyProjectRepositoryOutputWithContext(context.Background())
}
func (i *LegacyProjectRepository) ToLegacyProjectRepositoryOutputWithContext(ctx context.Context) LegacyProjectRepositoryOutput {
return pulumi.ToOutputWithContext(ctx, i).(LegacyProjectRepositoryOutput)
}
// LegacyProjectRepositoryArrayInput is an input type that accepts LegacyProjectRepositoryArray and LegacyProjectRepositoryArrayOutput values.
// You can construct a concrete instance of `LegacyProjectRepositoryArrayInput` via:
//
// LegacyProjectRepositoryArray{ LegacyProjectRepositoryArgs{...} }
type LegacyProjectRepositoryArrayInput interface {
pulumi.Input
ToLegacyProjectRepositoryArrayOutput() LegacyProjectRepositoryArrayOutput
ToLegacyProjectRepositoryArrayOutputWithContext(context.Context) LegacyProjectRepositoryArrayOutput
}
type LegacyProjectRepositoryArray []LegacyProjectRepositoryInput
func (LegacyProjectRepositoryArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*LegacyProjectRepository)(nil)).Elem()
}
func (i LegacyProjectRepositoryArray) ToLegacyProjectRepositoryArrayOutput() LegacyProjectRepositoryArrayOutput {
return i.ToLegacyProjectRepositoryArrayOutputWithContext(context.Background())
}
func (i LegacyProjectRepositoryArray) ToLegacyProjectRepositoryArrayOutputWithContext(ctx context.Context) LegacyProjectRepositoryArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(LegacyProjectRepositoryArrayOutput)
}
// LegacyProjectRepositoryMapInput is an input type that accepts LegacyProjectRepositoryMap and LegacyProjectRepositoryMapOutput values.
// You can construct a concrete instance of `LegacyProjectRepositoryMapInput` via:
//
// LegacyProjectRepositoryMap{ "key": LegacyProjectRepositoryArgs{...} }
type LegacyProjectRepositoryMapInput interface {
pulumi.Input
ToLegacyProjectRepositoryMapOutput() LegacyProjectRepositoryMapOutput
ToLegacyProjectRepositoryMapOutputWithContext(context.Context) LegacyProjectRepositoryMapOutput
}
type LegacyProjectRepositoryMap map[string]LegacyProjectRepositoryInput
func (LegacyProjectRepositoryMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*LegacyProjectRepository)(nil)).Elem()
}
func (i LegacyProjectRepositoryMap) ToLegacyProjectRepositoryMapOutput() LegacyProjectRepositoryMapOutput {
return i.ToLegacyProjectRepositoryMapOutputWithContext(context.Background())
}
func (i LegacyProjectRepositoryMap) ToLegacyProjectRepositoryMapOutputWithContext(ctx context.Context) LegacyProjectRepositoryMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(LegacyProjectRepositoryMapOutput)
}
type LegacyProjectRepositoryOutput struct{ *pulumi.OutputState }
func (LegacyProjectRepositoryOutput) ElementType() reflect.Type {
return reflect.TypeOf((**LegacyProjectRepository)(nil)).Elem()
}
func (o LegacyProjectRepositoryOutput) ToLegacyProjectRepositoryOutput() LegacyProjectRepositoryOutput {
return o
}
func (o LegacyProjectRepositoryOutput) ToLegacyProjectRepositoryOutputWithContext(ctx context.Context) LegacyProjectRepositoryOutput {
return o
}
// Project ID
func (o LegacyProjectRepositoryOutput) ProjectId() pulumi.IntOutput {
return o.ApplyT(func(v *LegacyProjectRepository) pulumi.IntOutput { return v.ProjectId }).(pulumi.IntOutput)
}
// Repository ID
func (o LegacyProjectRepositoryOutput) RepositoryId() pulumi.IntOutput {
return o.ApplyT(func(v *LegacyProjectRepository) pulumi.IntOutput { return v.RepositoryId }).(pulumi.IntOutput)
}
type LegacyProjectRepositoryArrayOutput struct{ *pulumi.OutputState }
func (LegacyProjectRepositoryArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*LegacyProjectRepository)(nil)).Elem()
}
func (o LegacyProjectRepositoryArrayOutput) ToLegacyProjectRepositoryArrayOutput() LegacyProjectRepositoryArrayOutput {
return o
}
func (o LegacyProjectRepositoryArrayOutput) ToLegacyProjectRepositoryArrayOutputWithContext(ctx context.Context) LegacyProjectRepositoryArrayOutput {
return o
}
func (o LegacyProjectRepositoryArrayOutput) Index(i pulumi.IntInput) LegacyProjectRepositoryOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *LegacyProjectRepository {
return vs[0].([]*LegacyProjectRepository)[vs[1].(int)]
}).(LegacyProjectRepositoryOutput)
}
type LegacyProjectRepositoryMapOutput struct{ *pulumi.OutputState }
func (LegacyProjectRepositoryMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*LegacyProjectRepository)(nil)).Elem()
}
func (o LegacyProjectRepositoryMapOutput) ToLegacyProjectRepositoryMapOutput() LegacyProjectRepositoryMapOutput {
return o
}
func (o LegacyProjectRepositoryMapOutput) ToLegacyProjectRepositoryMapOutputWithContext(ctx context.Context) LegacyProjectRepositoryMapOutput {
return o
}
func (o LegacyProjectRepositoryMapOutput) MapIndex(k pulumi.StringInput) LegacyProjectRepositoryOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *LegacyProjectRepository {
return vs[0].(map[string]*LegacyProjectRepository)[vs[1].(string)]
}).(LegacyProjectRepositoryOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*LegacyProjectRepositoryInput)(nil)).Elem(), &LegacyProjectRepository{})
pulumi.RegisterInputType(reflect.TypeOf((*LegacyProjectRepositoryArrayInput)(nil)).Elem(), LegacyProjectRepositoryArray{})
pulumi.RegisterInputType(reflect.TypeOf((*LegacyProjectRepositoryMapInput)(nil)).Elem(), LegacyProjectRepositoryMap{})
pulumi.RegisterOutputType(LegacyProjectRepositoryOutput{})
pulumi.RegisterOutputType(LegacyProjectRepositoryArrayOutput{})
pulumi.RegisterOutputType(LegacyProjectRepositoryMapOutput{})
}