pulumi/tests/testdata/codegen/go-plain-ref-repro/go/repro/ecs/fargateTaskDefinition.go

186 lines
7.0 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 ecs
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"go-plain-ref-repro/repro/internal"
)
type FargateTaskDefinition struct {
pulumi.ResourceState
LoadBalancers pulumi.StringArrayOutput `pulumi:"loadBalancers"`
}
// NewFargateTaskDefinition registers a new resource with the given unique name, arguments, and options.
func NewFargateTaskDefinition(ctx *pulumi.Context,
name string, args *FargateTaskDefinitionArgs, opts ...pulumi.ResourceOption) (*FargateTaskDefinition, error) {
if args == nil {
args = &FargateTaskDefinitionArgs{}
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource FargateTaskDefinition
err := ctx.RegisterRemoteComponentResource("repro:ecs:FargateTaskDefinition", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
type fargateTaskDefinitionArgs struct {
Container *TaskDefinitionContainerDefinition `pulumi:"container"`
Containers map[string]TaskDefinitionContainerDefinition `pulumi:"containers"`
}
// The set of arguments for constructing a FargateTaskDefinition resource.
type FargateTaskDefinitionArgs struct {
Container *TaskDefinitionContainerDefinitionArgs
Containers map[string]TaskDefinitionContainerDefinitionArgs
}
func (FargateTaskDefinitionArgs) ElementType() reflect.Type {
return reflect.TypeOf((*fargateTaskDefinitionArgs)(nil)).Elem()
}
type FargateTaskDefinitionInput interface {
pulumi.Input
ToFargateTaskDefinitionOutput() FargateTaskDefinitionOutput
ToFargateTaskDefinitionOutputWithContext(ctx context.Context) FargateTaskDefinitionOutput
}
func (*FargateTaskDefinition) ElementType() reflect.Type {
return reflect.TypeOf((**FargateTaskDefinition)(nil)).Elem()
}
func (i *FargateTaskDefinition) ToFargateTaskDefinitionOutput() FargateTaskDefinitionOutput {
return i.ToFargateTaskDefinitionOutputWithContext(context.Background())
}
func (i *FargateTaskDefinition) ToFargateTaskDefinitionOutputWithContext(ctx context.Context) FargateTaskDefinitionOutput {
return pulumi.ToOutputWithContext(ctx, i).(FargateTaskDefinitionOutput)
}
// FargateTaskDefinitionArrayInput is an input type that accepts FargateTaskDefinitionArray and FargateTaskDefinitionArrayOutput values.
// You can construct a concrete instance of `FargateTaskDefinitionArrayInput` via:
//
// FargateTaskDefinitionArray{ FargateTaskDefinitionArgs{...} }
type FargateTaskDefinitionArrayInput interface {
pulumi.Input
ToFargateTaskDefinitionArrayOutput() FargateTaskDefinitionArrayOutput
ToFargateTaskDefinitionArrayOutputWithContext(context.Context) FargateTaskDefinitionArrayOutput
}
type FargateTaskDefinitionArray []FargateTaskDefinitionInput
func (FargateTaskDefinitionArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*FargateTaskDefinition)(nil)).Elem()
}
func (i FargateTaskDefinitionArray) ToFargateTaskDefinitionArrayOutput() FargateTaskDefinitionArrayOutput {
return i.ToFargateTaskDefinitionArrayOutputWithContext(context.Background())
}
func (i FargateTaskDefinitionArray) ToFargateTaskDefinitionArrayOutputWithContext(ctx context.Context) FargateTaskDefinitionArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(FargateTaskDefinitionArrayOutput)
}
// FargateTaskDefinitionMapInput is an input type that accepts FargateTaskDefinitionMap and FargateTaskDefinitionMapOutput values.
// You can construct a concrete instance of `FargateTaskDefinitionMapInput` via:
//
// FargateTaskDefinitionMap{ "key": FargateTaskDefinitionArgs{...} }
type FargateTaskDefinitionMapInput interface {
pulumi.Input
ToFargateTaskDefinitionMapOutput() FargateTaskDefinitionMapOutput
ToFargateTaskDefinitionMapOutputWithContext(context.Context) FargateTaskDefinitionMapOutput
}
type FargateTaskDefinitionMap map[string]FargateTaskDefinitionInput
func (FargateTaskDefinitionMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*FargateTaskDefinition)(nil)).Elem()
}
func (i FargateTaskDefinitionMap) ToFargateTaskDefinitionMapOutput() FargateTaskDefinitionMapOutput {
return i.ToFargateTaskDefinitionMapOutputWithContext(context.Background())
}
func (i FargateTaskDefinitionMap) ToFargateTaskDefinitionMapOutputWithContext(ctx context.Context) FargateTaskDefinitionMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(FargateTaskDefinitionMapOutput)
}
type FargateTaskDefinitionOutput struct{ *pulumi.OutputState }
func (FargateTaskDefinitionOutput) ElementType() reflect.Type {
return reflect.TypeOf((**FargateTaskDefinition)(nil)).Elem()
}
func (o FargateTaskDefinitionOutput) ToFargateTaskDefinitionOutput() FargateTaskDefinitionOutput {
return o
}
func (o FargateTaskDefinitionOutput) ToFargateTaskDefinitionOutputWithContext(ctx context.Context) FargateTaskDefinitionOutput {
return o
}
func (o FargateTaskDefinitionOutput) LoadBalancers() pulumi.StringArrayOutput {
return o.ApplyT(func(v *FargateTaskDefinition) pulumi.StringArrayOutput { return v.LoadBalancers }).(pulumi.StringArrayOutput)
}
type FargateTaskDefinitionArrayOutput struct{ *pulumi.OutputState }
func (FargateTaskDefinitionArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*FargateTaskDefinition)(nil)).Elem()
}
func (o FargateTaskDefinitionArrayOutput) ToFargateTaskDefinitionArrayOutput() FargateTaskDefinitionArrayOutput {
return o
}
func (o FargateTaskDefinitionArrayOutput) ToFargateTaskDefinitionArrayOutputWithContext(ctx context.Context) FargateTaskDefinitionArrayOutput {
return o
}
func (o FargateTaskDefinitionArrayOutput) Index(i pulumi.IntInput) FargateTaskDefinitionOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *FargateTaskDefinition {
return vs[0].([]*FargateTaskDefinition)[vs[1].(int)]
}).(FargateTaskDefinitionOutput)
}
type FargateTaskDefinitionMapOutput struct{ *pulumi.OutputState }
func (FargateTaskDefinitionMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*FargateTaskDefinition)(nil)).Elem()
}
func (o FargateTaskDefinitionMapOutput) ToFargateTaskDefinitionMapOutput() FargateTaskDefinitionMapOutput {
return o
}
func (o FargateTaskDefinitionMapOutput) ToFargateTaskDefinitionMapOutputWithContext(ctx context.Context) FargateTaskDefinitionMapOutput {
return o
}
func (o FargateTaskDefinitionMapOutput) MapIndex(k pulumi.StringInput) FargateTaskDefinitionOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *FargateTaskDefinition {
return vs[0].(map[string]*FargateTaskDefinition)[vs[1].(string)]
}).(FargateTaskDefinitionOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*FargateTaskDefinitionInput)(nil)).Elem(), &FargateTaskDefinition{})
pulumi.RegisterInputType(reflect.TypeOf((*FargateTaskDefinitionArrayInput)(nil)).Elem(), FargateTaskDefinitionArray{})
pulumi.RegisterInputType(reflect.TypeOf((*FargateTaskDefinitionMapInput)(nil)).Elem(), FargateTaskDefinitionMap{})
pulumi.RegisterOutputType(FargateTaskDefinitionOutput{})
pulumi.RegisterOutputType(FargateTaskDefinitionArrayOutput{})
pulumi.RegisterOutputType(FargateTaskDefinitionMapOutput{})
}