// Code generated by crd2pulumi DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***

package v1alpha1

import (
	"context"
	"reflect"

	"antoine-roux.tk/projects/go/pulumi-library/crds/kubernetes/internal"
	v1 "github.com/pulumi/pulumi-kubernetes/sdk/v4/go/kubernetes/meta/v1"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumix"
)

// IngressRouteUDP is a CRD implementation of a Traefik UDP Router.
type IngressRouteUDP struct {
	pulumi.CustomResourceState

	ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"`
	Kind       pulumi.StringPtrOutput `pulumi:"kind"`
	Metadata   v1.ObjectMetaOutput    `pulumi:"metadata"`
	// IngressRouteUDPSpec defines the desired state of a IngressRouteUDP.
	Spec IngressRouteUDPSpecOutput `pulumi:"spec"`
}

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

	args.ApiVersion = pulumi.StringPtr("traefik.io/v1alpha1")
	args.Kind = pulumi.StringPtr("IngressRouteUDP")
	opts = internal.PkgResourceDefaultOpts(opts)
	var resource IngressRouteUDP
	err := ctx.RegisterResource("kubernetes:traefik.io/v1alpha1:IngressRouteUDP", name, args, &resource, opts...)
	if err != nil {
		return nil, err
	}
	return &resource, nil
}

// GetIngressRouteUDP gets an existing IngressRouteUDP 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 GetIngressRouteUDP(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *IngressRouteUDPState, opts ...pulumi.ResourceOption) (*IngressRouteUDP, error) {
	var resource IngressRouteUDP
	err := ctx.ReadResource("kubernetes:traefik.io/v1alpha1:IngressRouteUDP", name, id, state, &resource, opts...)
	if err != nil {
		return nil, err
	}
	return &resource, nil
}

// Input properties used for looking up and filtering IngressRouteUDP resources.
type ingressRouteUDPState struct {
}

type IngressRouteUDPState struct {
}

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

type ingressRouteUDPArgs struct {
	ApiVersion *string        `pulumi:"apiVersion"`
	Kind       *string        `pulumi:"kind"`
	Metadata   *v1.ObjectMeta `pulumi:"metadata"`
	// IngressRouteUDPSpec defines the desired state of a IngressRouteUDP.
	Spec *IngressRouteUDPSpec `pulumi:"spec"`
}

// The set of arguments for constructing a IngressRouteUDP resource.
type IngressRouteUDPArgs struct {
	ApiVersion pulumi.StringPtrInput
	Kind       pulumi.StringPtrInput
	Metadata   v1.ObjectMetaPtrInput
	// IngressRouteUDPSpec defines the desired state of a IngressRouteUDP.
	Spec IngressRouteUDPSpecPtrInput
}

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

type IngressRouteUDPInput interface {
	pulumi.Input

	ToIngressRouteUDPOutput() IngressRouteUDPOutput
	ToIngressRouteUDPOutputWithContext(ctx context.Context) IngressRouteUDPOutput
}

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

func (i *IngressRouteUDP) ToIngressRouteUDPOutput() IngressRouteUDPOutput {
	return i.ToIngressRouteUDPOutputWithContext(context.Background())
}

func (i *IngressRouteUDP) ToIngressRouteUDPOutputWithContext(ctx context.Context) IngressRouteUDPOutput {
	return pulumi.ToOutputWithContext(ctx, i).(IngressRouteUDPOutput)
}

func (i *IngressRouteUDP) ToOutput(ctx context.Context) pulumix.Output[*IngressRouteUDP] {
	return pulumix.Output[*IngressRouteUDP]{
		OutputState: i.ToIngressRouteUDPOutputWithContext(ctx).OutputState,
	}
}

type IngressRouteUDPOutput struct{ *pulumi.OutputState }

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

func (o IngressRouteUDPOutput) ToIngressRouteUDPOutput() IngressRouteUDPOutput {
	return o
}

func (o IngressRouteUDPOutput) ToIngressRouteUDPOutputWithContext(ctx context.Context) IngressRouteUDPOutput {
	return o
}

func (o IngressRouteUDPOutput) ToOutput(ctx context.Context) pulumix.Output[*IngressRouteUDP] {
	return pulumix.Output[*IngressRouteUDP]{
		OutputState: o.OutputState,
	}
}

func (o IngressRouteUDPOutput) ApiVersion() pulumi.StringPtrOutput {
	return o.ApplyT(func(v *IngressRouteUDP) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput)
}

func (o IngressRouteUDPOutput) Kind() pulumi.StringPtrOutput {
	return o.ApplyT(func(v *IngressRouteUDP) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput)
}

func (o IngressRouteUDPOutput) Metadata() v1.ObjectMetaOutput {
	return o.ApplyT(func(v *IngressRouteUDP) v1.ObjectMetaOutput { return v.Metadata }).(v1.ObjectMetaOutput)
}

// IngressRouteUDPSpec defines the desired state of a IngressRouteUDP.
func (o IngressRouteUDPOutput) Spec() IngressRouteUDPSpecOutput {
	return o.ApplyT(func(v *IngressRouteUDP) IngressRouteUDPSpecOutput { return v.Spec }).(IngressRouteUDPSpecOutput)
}

func init() {
	pulumi.RegisterInputType(reflect.TypeOf((*IngressRouteUDPInput)(nil)).Elem(), &IngressRouteUDP{})
	pulumi.RegisterOutputType(IngressRouteUDPOutput{})
}
