// 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" "resource-property-overlap/example/internal" ) type Rec struct { pulumi.CustomResourceState Rec RecOutput `pulumi:"rec"` } // NewRec registers a new resource with the given unique name, arguments, and options. func NewRec(ctx *pulumi.Context, name string, args *RecArgs, opts ...pulumi.ResourceOption) (*Rec, error) { if args == nil { args = &RecArgs{} } opts = internal.PkgResourceDefaultOpts(opts) var resource Rec err := ctx.RegisterResource("example::Rec", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetRec gets an existing Rec 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 GetRec(ctx *pulumi.Context, name string, id pulumi.IDInput, state *RecState, opts ...pulumi.ResourceOption) (*Rec, error) { var resource Rec err := ctx.ReadResource("example::Rec", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Rec resources. type recState struct { } type RecState struct { } func (RecState) ElementType() reflect.Type { return reflect.TypeOf((*recState)(nil)).Elem() } type recArgs struct { } // The set of arguments for constructing a Rec resource. type RecArgs struct { } func (RecArgs) ElementType() reflect.Type { return reflect.TypeOf((*recArgs)(nil)).Elem() } type RecInput interface { pulumi.Input ToRecOutput() RecOutput ToRecOutputWithContext(ctx context.Context) RecOutput } func (*Rec) ElementType() reflect.Type { return reflect.TypeOf((**Rec)(nil)).Elem() } func (i *Rec) ToRecOutput() RecOutput { return i.ToRecOutputWithContext(context.Background()) } func (i *Rec) ToRecOutputWithContext(ctx context.Context) RecOutput { return pulumi.ToOutputWithContext(ctx, i).(RecOutput) } // RecArrayInput is an input type that accepts RecArray and RecArrayOutput values. // You can construct a concrete instance of `RecArrayInput` via: // // RecArray{ RecArgs{...} } type RecArrayInput interface { pulumi.Input ToRecArrayOutput() RecArrayOutput ToRecArrayOutputWithContext(context.Context) RecArrayOutput } type RecArray []RecInput func (RecArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Rec)(nil)).Elem() } func (i RecArray) ToRecArrayOutput() RecArrayOutput { return i.ToRecArrayOutputWithContext(context.Background()) } func (i RecArray) ToRecArrayOutputWithContext(ctx context.Context) RecArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(RecArrayOutput) } // RecMapInput is an input type that accepts RecMap and RecMapOutput values. // You can construct a concrete instance of `RecMapInput` via: // // RecMap{ "key": RecArgs{...} } type RecMapInput interface { pulumi.Input ToRecMapOutput() RecMapOutput ToRecMapOutputWithContext(context.Context) RecMapOutput } type RecMap map[string]RecInput func (RecMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Rec)(nil)).Elem() } func (i RecMap) ToRecMapOutput() RecMapOutput { return i.ToRecMapOutputWithContext(context.Background()) } func (i RecMap) ToRecMapOutputWithContext(ctx context.Context) RecMapOutput { return pulumi.ToOutputWithContext(ctx, i).(RecMapOutput) } type RecOutput struct{ *pulumi.OutputState } func (RecOutput) ElementType() reflect.Type { return reflect.TypeOf((**Rec)(nil)).Elem() } func (o RecOutput) ToRecOutput() RecOutput { return o } func (o RecOutput) ToRecOutputWithContext(ctx context.Context) RecOutput { return o } func (o RecOutput) Rec() RecOutput { return o.ApplyT(func(v *Rec) RecOutput { return v.Rec }).(RecOutput) } type RecArrayOutput struct{ *pulumi.OutputState } func (RecArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Rec)(nil)).Elem() } func (o RecArrayOutput) ToRecArrayOutput() RecArrayOutput { return o } func (o RecArrayOutput) ToRecArrayOutputWithContext(ctx context.Context) RecArrayOutput { return o } func (o RecArrayOutput) Index(i pulumi.IntInput) RecOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Rec { return vs[0].([]*Rec)[vs[1].(int)] }).(RecOutput) } type RecMapOutput struct{ *pulumi.OutputState } func (RecMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Rec)(nil)).Elem() } func (o RecMapOutput) ToRecMapOutput() RecMapOutput { return o } func (o RecMapOutput) ToRecMapOutputWithContext(ctx context.Context) RecMapOutput { return o } func (o RecMapOutput) MapIndex(k pulumi.StringInput) RecOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Rec { return vs[0].(map[string]*Rec)[vs[1].(string)] }).(RecOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*RecInput)(nil)).Elem(), &Rec{}) pulumi.RegisterInputType(reflect.TypeOf((*RecArrayInput)(nil)).Elem(), RecArray{}) pulumi.RegisterInputType(reflect.TypeOf((*RecMapInput)(nil)).Elem(), RecMap{}) pulumi.RegisterOutputType(RecOutput{}) pulumi.RegisterOutputType(RecArrayOutput{}) pulumi.RegisterOutputType(RecMapOutput{}) }