mirror of https://github.com/pulumi/pulumi.git
211 lines
6.3 KiB
Go
211 lines
6.3 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"
|
|
"replace-on-change/example/internal"
|
|
)
|
|
|
|
type NoRecursive struct {
|
|
pulumi.CustomResourceState
|
|
|
|
Rec RecPtrOutput `pulumi:"rec"`
|
|
ReplaceMe pulumi.StringPtrOutput `pulumi:"replaceMe"`
|
|
}
|
|
|
|
// NewNoRecursive registers a new resource with the given unique name, arguments, and options.
|
|
func NewNoRecursive(ctx *pulumi.Context,
|
|
name string, args *NoRecursiveArgs, opts ...pulumi.ResourceOption) (*NoRecursive, error) {
|
|
if args == nil {
|
|
args = &NoRecursiveArgs{}
|
|
}
|
|
|
|
replaceOnChanges := pulumi.ReplaceOnChanges([]string{
|
|
"replaceMe",
|
|
})
|
|
opts = append(opts, replaceOnChanges)
|
|
opts = internal.PkgResourceDefaultOpts(opts)
|
|
var resource NoRecursive
|
|
err := ctx.RegisterResource("example::NoRecursive", name, args, &resource, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &resource, nil
|
|
}
|
|
|
|
// GetNoRecursive gets an existing NoRecursive 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 GetNoRecursive(ctx *pulumi.Context,
|
|
name string, id pulumi.IDInput, state *NoRecursiveState, opts ...pulumi.ResourceOption) (*NoRecursive, error) {
|
|
var resource NoRecursive
|
|
err := ctx.ReadResource("example::NoRecursive", name, id, state, &resource, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &resource, nil
|
|
}
|
|
|
|
// Input properties used for looking up and filtering NoRecursive resources.
|
|
type noRecursiveState struct {
|
|
}
|
|
|
|
type NoRecursiveState struct {
|
|
}
|
|
|
|
func (NoRecursiveState) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*noRecursiveState)(nil)).Elem()
|
|
}
|
|
|
|
type noRecursiveArgs struct {
|
|
}
|
|
|
|
// The set of arguments for constructing a NoRecursive resource.
|
|
type NoRecursiveArgs struct {
|
|
}
|
|
|
|
func (NoRecursiveArgs) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*noRecursiveArgs)(nil)).Elem()
|
|
}
|
|
|
|
type NoRecursiveInput interface {
|
|
pulumi.Input
|
|
|
|
ToNoRecursiveOutput() NoRecursiveOutput
|
|
ToNoRecursiveOutputWithContext(ctx context.Context) NoRecursiveOutput
|
|
}
|
|
|
|
func (*NoRecursive) ElementType() reflect.Type {
|
|
return reflect.TypeOf((**NoRecursive)(nil)).Elem()
|
|
}
|
|
|
|
func (i *NoRecursive) ToNoRecursiveOutput() NoRecursiveOutput {
|
|
return i.ToNoRecursiveOutputWithContext(context.Background())
|
|
}
|
|
|
|
func (i *NoRecursive) ToNoRecursiveOutputWithContext(ctx context.Context) NoRecursiveOutput {
|
|
return pulumi.ToOutputWithContext(ctx, i).(NoRecursiveOutput)
|
|
}
|
|
|
|
// NoRecursiveArrayInput is an input type that accepts NoRecursiveArray and NoRecursiveArrayOutput values.
|
|
// You can construct a concrete instance of `NoRecursiveArrayInput` via:
|
|
//
|
|
// NoRecursiveArray{ NoRecursiveArgs{...} }
|
|
type NoRecursiveArrayInput interface {
|
|
pulumi.Input
|
|
|
|
ToNoRecursiveArrayOutput() NoRecursiveArrayOutput
|
|
ToNoRecursiveArrayOutputWithContext(context.Context) NoRecursiveArrayOutput
|
|
}
|
|
|
|
type NoRecursiveArray []NoRecursiveInput
|
|
|
|
func (NoRecursiveArray) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*[]*NoRecursive)(nil)).Elem()
|
|
}
|
|
|
|
func (i NoRecursiveArray) ToNoRecursiveArrayOutput() NoRecursiveArrayOutput {
|
|
return i.ToNoRecursiveArrayOutputWithContext(context.Background())
|
|
}
|
|
|
|
func (i NoRecursiveArray) ToNoRecursiveArrayOutputWithContext(ctx context.Context) NoRecursiveArrayOutput {
|
|
return pulumi.ToOutputWithContext(ctx, i).(NoRecursiveArrayOutput)
|
|
}
|
|
|
|
// NoRecursiveMapInput is an input type that accepts NoRecursiveMap and NoRecursiveMapOutput values.
|
|
// You can construct a concrete instance of `NoRecursiveMapInput` via:
|
|
//
|
|
// NoRecursiveMap{ "key": NoRecursiveArgs{...} }
|
|
type NoRecursiveMapInput interface {
|
|
pulumi.Input
|
|
|
|
ToNoRecursiveMapOutput() NoRecursiveMapOutput
|
|
ToNoRecursiveMapOutputWithContext(context.Context) NoRecursiveMapOutput
|
|
}
|
|
|
|
type NoRecursiveMap map[string]NoRecursiveInput
|
|
|
|
func (NoRecursiveMap) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*map[string]*NoRecursive)(nil)).Elem()
|
|
}
|
|
|
|
func (i NoRecursiveMap) ToNoRecursiveMapOutput() NoRecursiveMapOutput {
|
|
return i.ToNoRecursiveMapOutputWithContext(context.Background())
|
|
}
|
|
|
|
func (i NoRecursiveMap) ToNoRecursiveMapOutputWithContext(ctx context.Context) NoRecursiveMapOutput {
|
|
return pulumi.ToOutputWithContext(ctx, i).(NoRecursiveMapOutput)
|
|
}
|
|
|
|
type NoRecursiveOutput struct{ *pulumi.OutputState }
|
|
|
|
func (NoRecursiveOutput) ElementType() reflect.Type {
|
|
return reflect.TypeOf((**NoRecursive)(nil)).Elem()
|
|
}
|
|
|
|
func (o NoRecursiveOutput) ToNoRecursiveOutput() NoRecursiveOutput {
|
|
return o
|
|
}
|
|
|
|
func (o NoRecursiveOutput) ToNoRecursiveOutputWithContext(ctx context.Context) NoRecursiveOutput {
|
|
return o
|
|
}
|
|
|
|
func (o NoRecursiveOutput) Rec() RecPtrOutput {
|
|
return o.ApplyT(func(v *NoRecursive) RecPtrOutput { return v.Rec }).(RecPtrOutput)
|
|
}
|
|
|
|
func (o NoRecursiveOutput) ReplaceMe() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v *NoRecursive) pulumi.StringPtrOutput { return v.ReplaceMe }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
type NoRecursiveArrayOutput struct{ *pulumi.OutputState }
|
|
|
|
func (NoRecursiveArrayOutput) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*[]*NoRecursive)(nil)).Elem()
|
|
}
|
|
|
|
func (o NoRecursiveArrayOutput) ToNoRecursiveArrayOutput() NoRecursiveArrayOutput {
|
|
return o
|
|
}
|
|
|
|
func (o NoRecursiveArrayOutput) ToNoRecursiveArrayOutputWithContext(ctx context.Context) NoRecursiveArrayOutput {
|
|
return o
|
|
}
|
|
|
|
func (o NoRecursiveArrayOutput) Index(i pulumi.IntInput) NoRecursiveOutput {
|
|
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NoRecursive {
|
|
return vs[0].([]*NoRecursive)[vs[1].(int)]
|
|
}).(NoRecursiveOutput)
|
|
}
|
|
|
|
type NoRecursiveMapOutput struct{ *pulumi.OutputState }
|
|
|
|
func (NoRecursiveMapOutput) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*map[string]*NoRecursive)(nil)).Elem()
|
|
}
|
|
|
|
func (o NoRecursiveMapOutput) ToNoRecursiveMapOutput() NoRecursiveMapOutput {
|
|
return o
|
|
}
|
|
|
|
func (o NoRecursiveMapOutput) ToNoRecursiveMapOutputWithContext(ctx context.Context) NoRecursiveMapOutput {
|
|
return o
|
|
}
|
|
|
|
func (o NoRecursiveMapOutput) MapIndex(k pulumi.StringInput) NoRecursiveOutput {
|
|
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NoRecursive {
|
|
return vs[0].(map[string]*NoRecursive)[vs[1].(string)]
|
|
}).(NoRecursiveOutput)
|
|
}
|
|
|
|
func init() {
|
|
pulumi.RegisterOutputType(NoRecursiveOutput{})
|
|
pulumi.RegisterOutputType(NoRecursiveArrayOutput{})
|
|
pulumi.RegisterOutputType(NoRecursiveMapOutput{})
|
|
}
|