github.com/myhau/pulumi/pkg/v3@v3.70.2-0.20221116134521-f2775972e587/codegen/testing/test/testdata/regress-8403/go/mongodbatlas/provider.go (about) 1 // Code generated by test DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package mongodbatlas 5 6 import ( 7 "context" 8 "reflect" 9 10 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 11 ) 12 13 type Provider struct { 14 pulumi.ProviderResourceState 15 } 16 17 // NewProvider registers a new resource with the given unique name, arguments, and options. 18 func NewProvider(ctx *pulumi.Context, 19 name string, args *ProviderArgs, opts ...pulumi.ResourceOption) (*Provider, error) { 20 if args == nil { 21 args = &ProviderArgs{} 22 } 23 24 var resource Provider 25 err := ctx.RegisterResource("pulumi:providers:mongodbatlas", name, args, &resource, opts...) 26 if err != nil { 27 return nil, err 28 } 29 return &resource, nil 30 } 31 32 type providerArgs struct { 33 } 34 35 // The set of arguments for constructing a Provider resource. 36 type ProviderArgs struct { 37 } 38 39 func (ProviderArgs) ElementType() reflect.Type { 40 return reflect.TypeOf((*providerArgs)(nil)).Elem() 41 } 42 43 type ProviderInput interface { 44 pulumi.Input 45 46 ToProviderOutput() ProviderOutput 47 ToProviderOutputWithContext(ctx context.Context) ProviderOutput 48 } 49 50 func (*Provider) ElementType() reflect.Type { 51 return reflect.TypeOf((**Provider)(nil)).Elem() 52 } 53 54 func (i *Provider) ToProviderOutput() ProviderOutput { 55 return i.ToProviderOutputWithContext(context.Background()) 56 } 57 58 func (i *Provider) ToProviderOutputWithContext(ctx context.Context) ProviderOutput { 59 return pulumi.ToOutputWithContext(ctx, i).(ProviderOutput) 60 } 61 62 type ProviderOutput struct{ *pulumi.OutputState } 63 64 func (ProviderOutput) ElementType() reflect.Type { 65 return reflect.TypeOf((**Provider)(nil)).Elem() 66 } 67 68 func (o ProviderOutput) ToProviderOutput() ProviderOutput { 69 return o 70 } 71 72 func (o ProviderOutput) ToProviderOutputWithContext(ctx context.Context) ProviderOutput { 73 return o 74 } 75 76 func init() { 77 pulumi.RegisterInputType(reflect.TypeOf((*ProviderInput)(nil)).Elem(), &Provider{}) 78 pulumi.RegisterOutputType(ProviderOutput{}) 79 }