// *** WARNING: this file was generated by test. ***
// *** 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"
)

type God struct {
	pulumi.CustomResourceState

	Backwards DogOutput `pulumi:"backwards"`
}

// NewGod registers a new resource with the given unique name, arguments, and options.
func NewGod(ctx *pulumi.Context,
	name string, args *GodArgs, opts ...pulumi.ResourceOption) (*God, error) {
	if args == nil {
		args = &GodArgs{}
	}

	var resource God
	err := ctx.RegisterResource("example::God", name, args, &resource, opts...)
	if err != nil {
		return nil, err
	}
	return &resource, nil
}

// GetGod gets an existing God 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 GetGod(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *GodState, opts ...pulumi.ResourceOption) (*God, error) {
	var resource God
	err := ctx.ReadResource("example::God", name, id, state, &resource, opts...)
	if err != nil {
		return nil, err
	}
	return &resource, nil
}

// Input properties used for looking up and filtering God resources.
type godState struct {
}

type GodState struct {
}

func (GodState) ElementType() reflect.Type {
	return reflect.TypeOf((*godState)(nil)).Elem()
}

type godArgs struct {
}

// The set of arguments for constructing a God resource.
type GodArgs struct {
}

func (GodArgs) ElementType() reflect.Type {
	return reflect.TypeOf((*godArgs)(nil)).Elem()
}

type GodInput interface {
	pulumi.Input

	ToGodOutput() GodOutput
	ToGodOutputWithContext(ctx context.Context) GodOutput
}

func (*God) ElementType() reflect.Type {
	return reflect.TypeOf((*God)(nil))
}

func (i *God) ToGodOutput() GodOutput {
	return i.ToGodOutputWithContext(context.Background())
}

func (i *God) ToGodOutputWithContext(ctx context.Context) GodOutput {
	return pulumi.ToOutputWithContext(ctx, i).(GodOutput)
}

func (i *God) ToGodPtrOutput() GodPtrOutput {
	return i.ToGodPtrOutputWithContext(context.Background())
}

func (i *God) ToGodPtrOutputWithContext(ctx context.Context) GodPtrOutput {
	return pulumi.ToOutputWithContext(ctx, i).(GodPtrOutput)
}

type GodPtrInput interface {
	pulumi.Input

	ToGodPtrOutput() GodPtrOutput
	ToGodPtrOutputWithContext(ctx context.Context) GodPtrOutput
}

type godPtrType GodArgs

func (*godPtrType) ElementType() reflect.Type {
	return reflect.TypeOf((**God)(nil))
}

func (i *godPtrType) ToGodPtrOutput() GodPtrOutput {
	return i.ToGodPtrOutputWithContext(context.Background())
}

func (i *godPtrType) ToGodPtrOutputWithContext(ctx context.Context) GodPtrOutput {
	return pulumi.ToOutputWithContext(ctx, i).(GodPtrOutput)
}

// GodArrayInput is an input type that accepts GodArray and GodArrayOutput values.
// You can construct a concrete instance of `GodArrayInput` via:
//
//          GodArray{ GodArgs{...} }
type GodArrayInput interface {
	pulumi.Input

	ToGodArrayOutput() GodArrayOutput
	ToGodArrayOutputWithContext(context.Context) GodArrayOutput
}

type GodArray []GodInput

func (GodArray) ElementType() reflect.Type {
	return reflect.TypeOf((*[]*God)(nil)).Elem()
}

func (i GodArray) ToGodArrayOutput() GodArrayOutput {
	return i.ToGodArrayOutputWithContext(context.Background())
}

func (i GodArray) ToGodArrayOutputWithContext(ctx context.Context) GodArrayOutput {
	return pulumi.ToOutputWithContext(ctx, i).(GodArrayOutput)
}

// GodMapInput is an input type that accepts GodMap and GodMapOutput values.
// You can construct a concrete instance of `GodMapInput` via:
//
//          GodMap{ "key": GodArgs{...} }
type GodMapInput interface {
	pulumi.Input

	ToGodMapOutput() GodMapOutput
	ToGodMapOutputWithContext(context.Context) GodMapOutput
}

type GodMap map[string]GodInput

func (GodMap) ElementType() reflect.Type {
	return reflect.TypeOf((*map[string]*God)(nil)).Elem()
}

func (i GodMap) ToGodMapOutput() GodMapOutput {
	return i.ToGodMapOutputWithContext(context.Background())
}

func (i GodMap) ToGodMapOutputWithContext(ctx context.Context) GodMapOutput {
	return pulumi.ToOutputWithContext(ctx, i).(GodMapOutput)
}

type GodOutput struct{ *pulumi.OutputState }

func (GodOutput) ElementType() reflect.Type {
	return reflect.TypeOf((*God)(nil))
}

func (o GodOutput) ToGodOutput() GodOutput {
	return o
}

func (o GodOutput) ToGodOutputWithContext(ctx context.Context) GodOutput {
	return o
}

func (o GodOutput) ToGodPtrOutput() GodPtrOutput {
	return o.ToGodPtrOutputWithContext(context.Background())
}

func (o GodOutput) ToGodPtrOutputWithContext(ctx context.Context) GodPtrOutput {
	return o.ApplyTWithContext(ctx, func(_ context.Context, v God) *God {
		return &v
	}).(GodPtrOutput)
}

type GodPtrOutput struct{ *pulumi.OutputState }

func (GodPtrOutput) ElementType() reflect.Type {
	return reflect.TypeOf((**God)(nil))
}

func (o GodPtrOutput) ToGodPtrOutput() GodPtrOutput {
	return o
}

func (o GodPtrOutput) ToGodPtrOutputWithContext(ctx context.Context) GodPtrOutput {
	return o
}

func (o GodPtrOutput) Elem() GodOutput {
	return o.ApplyT(func(v *God) God {
		if v != nil {
			return *v
		}
		var ret God
		return ret
	}).(GodOutput)
}

type GodArrayOutput struct{ *pulumi.OutputState }

func (GodArrayOutput) ElementType() reflect.Type {
	return reflect.TypeOf((*[]God)(nil))
}

func (o GodArrayOutput) ToGodArrayOutput() GodArrayOutput {
	return o
}

func (o GodArrayOutput) ToGodArrayOutputWithContext(ctx context.Context) GodArrayOutput {
	return o
}

func (o GodArrayOutput) Index(i pulumi.IntInput) GodOutput {
	return pulumi.All(o, i).ApplyT(func(vs []interface{}) God {
		return vs[0].([]God)[vs[1].(int)]
	}).(GodOutput)
}

type GodMapOutput struct{ *pulumi.OutputState }

func (GodMapOutput) ElementType() reflect.Type {
	return reflect.TypeOf((*map[string]God)(nil))
}

func (o GodMapOutput) ToGodMapOutput() GodMapOutput {
	return o
}

func (o GodMapOutput) ToGodMapOutputWithContext(ctx context.Context) GodMapOutput {
	return o
}

func (o GodMapOutput) MapIndex(k pulumi.StringInput) GodOutput {
	return pulumi.All(o, k).ApplyT(func(vs []interface{}) God {
		return vs[0].(map[string]God)[vs[1].(string)]
	}).(GodOutput)
}

func init() {
	pulumi.RegisterOutputType(GodOutput{})
	pulumi.RegisterOutputType(GodPtrOutput{})
	pulumi.RegisterOutputType(GodArrayOutput{})
	pulumi.RegisterOutputType(GodMapOutput{})
}
