mirror of https://github.com/pulumi/pulumi.git
105 lines
2.9 KiB
Go
105 lines
2.9 KiB
Go
// Code generated by test DO NOT EDIT.
|
|
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
|
|
|
|
package example
|
|
|
|
import (
|
|
"context"
|
|
"reflect"
|
|
|
|
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
|
|
"naming-collisions/example/internal"
|
|
)
|
|
|
|
type MainComponent struct {
|
|
pulumi.CustomResourceState
|
|
}
|
|
|
|
// NewMainComponent registers a new resource with the given unique name, arguments, and options.
|
|
func NewMainComponent(ctx *pulumi.Context,
|
|
name string, args *MainComponentArgs, opts ...pulumi.ResourceOption) (*MainComponent, error) {
|
|
if args == nil {
|
|
args = &MainComponentArgs{}
|
|
}
|
|
|
|
opts = internal.PkgResourceDefaultOpts(opts)
|
|
var resource MainComponent
|
|
err := ctx.RegisterResource("example::MainComponent", name, args, &resource, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &resource, nil
|
|
}
|
|
|
|
// GetMainComponent gets an existing MainComponent 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 GetMainComponent(ctx *pulumi.Context,
|
|
name string, id pulumi.IDInput, state *MainComponentState, opts ...pulumi.ResourceOption) (*MainComponent, error) {
|
|
var resource MainComponent
|
|
err := ctx.ReadResource("example::MainComponent", name, id, state, &resource, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &resource, nil
|
|
}
|
|
|
|
// Input properties used for looking up and filtering MainComponent resources.
|
|
type mainComponentState struct {
|
|
}
|
|
|
|
type MainComponentState struct {
|
|
}
|
|
|
|
func (MainComponentState) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*mainComponentState)(nil)).Elem()
|
|
}
|
|
|
|
type mainComponentArgs struct {
|
|
}
|
|
|
|
// The set of arguments for constructing a MainComponent resource.
|
|
type MainComponentArgs struct {
|
|
}
|
|
|
|
func (MainComponentArgs) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*mainComponentArgs)(nil)).Elem()
|
|
}
|
|
|
|
type MainComponentInput interface {
|
|
pulumi.Input
|
|
|
|
ToMainComponentOutput() MainComponentOutput
|
|
ToMainComponentOutputWithContext(ctx context.Context) MainComponentOutput
|
|
}
|
|
|
|
func (*MainComponent) ElementType() reflect.Type {
|
|
return reflect.TypeOf((**MainComponent)(nil)).Elem()
|
|
}
|
|
|
|
func (i *MainComponent) ToMainComponentOutput() MainComponentOutput {
|
|
return i.ToMainComponentOutputWithContext(context.Background())
|
|
}
|
|
|
|
func (i *MainComponent) ToMainComponentOutputWithContext(ctx context.Context) MainComponentOutput {
|
|
return pulumi.ToOutputWithContext(ctx, i).(MainComponentOutput)
|
|
}
|
|
|
|
type MainComponentOutput struct{ *pulumi.OutputState }
|
|
|
|
func (MainComponentOutput) ElementType() reflect.Type {
|
|
return reflect.TypeOf((**MainComponent)(nil)).Elem()
|
|
}
|
|
|
|
func (o MainComponentOutput) ToMainComponentOutput() MainComponentOutput {
|
|
return o
|
|
}
|
|
|
|
func (o MainComponentOutput) ToMainComponentOutputWithContext(ctx context.Context) MainComponentOutput {
|
|
return o
|
|
}
|
|
|
|
func init() {
|
|
pulumi.RegisterInputType(reflect.TypeOf((*MainComponentInput)(nil)).Elem(), &MainComponent{})
|
|
pulumi.RegisterOutputType(MainComponentOutput{})
|
|
}
|