// *** WARNING: this file was generated by test. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package registrygeoreplication

import (
	"context"
	"reflect"

	"github.com/pkg/errors"
	containerregistry "github.com/pulumi/pulumi-azure-native/sdk/go/azure/containerregistry"
	resources "github.com/pulumi/pulumi-azure-native/sdk/go/azure/resources"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

type RegistryGeoReplication struct {
	pulumi.ResourceState

	// The login server url
	AcrLoginServerOut pulumi.StringOutput `pulumi:"acrLoginServerOut"`
	// The Registry
	Registry containerregistry.RegistryOutput `pulumi:"registry"`
	// The replication policy
	Replication containerregistry.ReplicationOutput `pulumi:"replication"`
}

// NewRegistryGeoReplication registers a new resource with the given unique name, arguments, and options.
func NewRegistryGeoReplication(ctx *pulumi.Context,
	name string, args *RegistryGeoReplicationArgs, opts ...pulumi.ResourceOption) (*RegistryGeoReplication, error) {
	if args == nil {
		return nil, errors.New("missing one or more required arguments")
	}

	if args.ResourceGroup == nil {
		return nil, errors.New("invalid value for required argument 'ResourceGroup'")
	}
	var resource RegistryGeoReplication
	err := ctx.RegisterRemoteComponentResource("registrygeoreplication:index:RegistryGeoReplication", name, args, &resource, opts...)
	if err != nil {
		return nil, err
	}
	return &resource, nil
}

type registryGeoReplicationArgs struct {
	// The resource group that hosts the component resource
	ResourceGroup *resources.ResourceGroup `pulumi:"resourceGroup"`
}

// The set of arguments for constructing a RegistryGeoReplication resource.
type RegistryGeoReplicationArgs struct {
	// The resource group that hosts the component resource
	ResourceGroup resources.ResourceGroupInput
}

func (RegistryGeoReplicationArgs) ElementType() reflect.Type {
	return reflect.TypeOf((*registryGeoReplicationArgs)(nil)).Elem()
}

type RegistryGeoReplicationInput interface {
	pulumi.Input

	ToRegistryGeoReplicationOutput() RegistryGeoReplicationOutput
	ToRegistryGeoReplicationOutputWithContext(ctx context.Context) RegistryGeoReplicationOutput
}

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

func (i *RegistryGeoReplication) ToRegistryGeoReplicationOutput() RegistryGeoReplicationOutput {
	return i.ToRegistryGeoReplicationOutputWithContext(context.Background())
}

func (i *RegistryGeoReplication) ToRegistryGeoReplicationOutputWithContext(ctx context.Context) RegistryGeoReplicationOutput {
	return pulumi.ToOutputWithContext(ctx, i).(RegistryGeoReplicationOutput)
}

// RegistryGeoReplicationArrayInput is an input type that accepts RegistryGeoReplicationArray and RegistryGeoReplicationArrayOutput values.
// You can construct a concrete instance of `RegistryGeoReplicationArrayInput` via:
//
//          RegistryGeoReplicationArray{ RegistryGeoReplicationArgs{...} }
type RegistryGeoReplicationArrayInput interface {
	pulumi.Input

	ToRegistryGeoReplicationArrayOutput() RegistryGeoReplicationArrayOutput
	ToRegistryGeoReplicationArrayOutputWithContext(context.Context) RegistryGeoReplicationArrayOutput
}

type RegistryGeoReplicationArray []RegistryGeoReplicationInput

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

func (i RegistryGeoReplicationArray) ToRegistryGeoReplicationArrayOutput() RegistryGeoReplicationArrayOutput {
	return i.ToRegistryGeoReplicationArrayOutputWithContext(context.Background())
}

func (i RegistryGeoReplicationArray) ToRegistryGeoReplicationArrayOutputWithContext(ctx context.Context) RegistryGeoReplicationArrayOutput {
	return pulumi.ToOutputWithContext(ctx, i).(RegistryGeoReplicationArrayOutput)
}

// RegistryGeoReplicationMapInput is an input type that accepts RegistryGeoReplicationMap and RegistryGeoReplicationMapOutput values.
// You can construct a concrete instance of `RegistryGeoReplicationMapInput` via:
//
//          RegistryGeoReplicationMap{ "key": RegistryGeoReplicationArgs{...} }
type RegistryGeoReplicationMapInput interface {
	pulumi.Input

	ToRegistryGeoReplicationMapOutput() RegistryGeoReplicationMapOutput
	ToRegistryGeoReplicationMapOutputWithContext(context.Context) RegistryGeoReplicationMapOutput
}

type RegistryGeoReplicationMap map[string]RegistryGeoReplicationInput

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

func (i RegistryGeoReplicationMap) ToRegistryGeoReplicationMapOutput() RegistryGeoReplicationMapOutput {
	return i.ToRegistryGeoReplicationMapOutputWithContext(context.Background())
}

func (i RegistryGeoReplicationMap) ToRegistryGeoReplicationMapOutputWithContext(ctx context.Context) RegistryGeoReplicationMapOutput {
	return pulumi.ToOutputWithContext(ctx, i).(RegistryGeoReplicationMapOutput)
}

type RegistryGeoReplicationOutput struct{ *pulumi.OutputState }

func (RegistryGeoReplicationOutput) ElementType() reflect.Type {
	return reflect.TypeOf((**RegistryGeoReplication)(nil)).Elem()
}

func (o RegistryGeoReplicationOutput) ToRegistryGeoReplicationOutput() RegistryGeoReplicationOutput {
	return o
}

func (o RegistryGeoReplicationOutput) ToRegistryGeoReplicationOutputWithContext(ctx context.Context) RegistryGeoReplicationOutput {
	return o
}

type RegistryGeoReplicationArrayOutput struct{ *pulumi.OutputState }

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

func (o RegistryGeoReplicationArrayOutput) ToRegistryGeoReplicationArrayOutput() RegistryGeoReplicationArrayOutput {
	return o
}

func (o RegistryGeoReplicationArrayOutput) ToRegistryGeoReplicationArrayOutputWithContext(ctx context.Context) RegistryGeoReplicationArrayOutput {
	return o
}

func (o RegistryGeoReplicationArrayOutput) Index(i pulumi.IntInput) RegistryGeoReplicationOutput {
	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *RegistryGeoReplication {
		return vs[0].([]*RegistryGeoReplication)[vs[1].(int)]
	}).(RegistryGeoReplicationOutput)
}

type RegistryGeoReplicationMapOutput struct{ *pulumi.OutputState }

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

func (o RegistryGeoReplicationMapOutput) ToRegistryGeoReplicationMapOutput() RegistryGeoReplicationMapOutput {
	return o
}

func (o RegistryGeoReplicationMapOutput) ToRegistryGeoReplicationMapOutputWithContext(ctx context.Context) RegistryGeoReplicationMapOutput {
	return o
}

func (o RegistryGeoReplicationMapOutput) MapIndex(k pulumi.StringInput) RegistryGeoReplicationOutput {
	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *RegistryGeoReplication {
		return vs[0].(map[string]*RegistryGeoReplication)[vs[1].(string)]
	}).(RegistryGeoReplicationOutput)
}

func init() {
	pulumi.RegisterInputType(reflect.TypeOf((*RegistryGeoReplicationInput)(nil)).Elem(), &RegistryGeoReplication{})
	pulumi.RegisterInputType(reflect.TypeOf((*RegistryGeoReplicationArrayInput)(nil)).Elem(), RegistryGeoReplicationArray{})
	pulumi.RegisterInputType(reflect.TypeOf((*RegistryGeoReplicationMapInput)(nil)).Elem(), RegistryGeoReplicationMap{})
	pulumi.RegisterOutputType(RegistryGeoReplicationOutput{})
	pulumi.RegisterOutputType(RegistryGeoReplicationArrayOutput{})
	pulumi.RegisterOutputType(RegistryGeoReplicationMapOutput{})
}
