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

package v1alpha2

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"
)

var _ = internal.GetEnvOrDefault

// UDPRoute provides a way to route UDP traffic. When combined with a Gateway listener, it can be used to forward traffic on the port specified by the listener to a set of backends specified by the UDPRoute.
type UDPRouteType struct {
	ApiVersion *string        `pulumi:"apiVersion"`
	Kind       *string        `pulumi:"kind"`
	Metadata   *v1.ObjectMeta `pulumi:"metadata"`
	// Spec defines the desired state of UDPRoute.
	Spec UDPRouteSpec `pulumi:"spec"`
	// Status defines the current state of UDPRoute.
	Status *UDPRouteStatus `pulumi:"status"`
}

type UDPRouteMetadata struct {
}

// Spec defines the desired state of UDPRoute.
type UDPRouteSpec struct {
	// ParentRefs references the resources (usually Gateways) that a Route wants to be attached to. Note that the referenced parent resource needs to allow this for the attachment to be complete. For Gateways, that means the Gateway needs to allow attachment from Routes of this kind and namespace. For Services, that means the Service must either be in the same namespace for a "producer" route, or the mesh implementation must support and allow "consumer" routes for the referenced Service. ReferenceGrant is not applicable for governing ParentRefs to Services - it is not possible to create a "producer" route for a Service in a different namespace from the Route.
	//  There are two kinds of parent resources with "Core" support:
	//  * Gateway (Gateway conformance profile)  * Service (Mesh conformance profile, experimental, ClusterIP Services only)  This API may be extended in the future to support additional kinds of parent resources.
	//     ParentRefs must be _distinct_. This means either that:
	//  * They select different objects.  If this is the case, then parentRef entries are distinct. In terms of fields, this means that the multi-part key defined by `group`, `kind`, `namespace`, and `name` must be unique across all parentRef entries in the Route. * They do not select different objects, but for each optional field used, each ParentRef that selects the same object must set the same set of optional fields to different values. If one ParentRef sets a combination of optional fields, all must set the same combination.
	//     Some examples:
	//  * If one ParentRef sets `sectionName`, all ParentRefs referencing the same object must also set `sectionName`. * If one ParentRef sets `port`, all ParentRefs referencing the same object must also set `port`. * If one ParentRef sets `sectionName` and `port`, all ParentRefs referencing the same object must also set `sectionName` and `port`.
	//     It is possible to separately reference multiple distinct objects that may be collapsed by an implementation. For example, some implementations may choose to merge compatible Gateway Listeners together. If that is the case, the list of routes attached to those resources should also be merged.
	//     Note that for ParentRefs that cross namespace boundaries, there are specific rules. Cross-namespace references are only valid if they are explicitly allowed by something in the namespace they are referring to. For example, Gateway has the AllowedRoutes field, and ReferenceGrant provides a generic way to enable other kinds of cross-namespace reference.
	//      ParentRefs from a Route to a Service in the same namespace are "producer" routes, which apply default routing rules to inbound connections from any namespace to the Service.
	//     ParentRefs from a Route to a Service in a different namespace are "consumer" routes, and these routing rules are only applied to outbound connections originating from the same namespace as the Route, for which the intended destination of the connections are a Service targeted as a ParentRef of the Route.
	ParentRefs []UDPRouteSpecParentRefs `pulumi:"parentRefs"`
	// Rules are a list of UDP matchers and actions.
	Rules []UDPRouteSpecRules `pulumi:"rules"`
}

// UDPRouteSpecInput is an input type that accepts UDPRouteSpecArgs and UDPRouteSpecOutput values.
// You can construct a concrete instance of `UDPRouteSpecInput` via:
//
//	UDPRouteSpecArgs{...}
type UDPRouteSpecInput interface {
	pulumi.Input

	ToUDPRouteSpecOutput() UDPRouteSpecOutput
	ToUDPRouteSpecOutputWithContext(context.Context) UDPRouteSpecOutput
}

// Spec defines the desired state of UDPRoute.
type UDPRouteSpecArgs struct {
	// ParentRefs references the resources (usually Gateways) that a Route wants to be attached to. Note that the referenced parent resource needs to allow this for the attachment to be complete. For Gateways, that means the Gateway needs to allow attachment from Routes of this kind and namespace. For Services, that means the Service must either be in the same namespace for a "producer" route, or the mesh implementation must support and allow "consumer" routes for the referenced Service. ReferenceGrant is not applicable for governing ParentRefs to Services - it is not possible to create a "producer" route for a Service in a different namespace from the Route.
	//  There are two kinds of parent resources with "Core" support:
	//  * Gateway (Gateway conformance profile)  * Service (Mesh conformance profile, experimental, ClusterIP Services only)  This API may be extended in the future to support additional kinds of parent resources.
	//     ParentRefs must be _distinct_. This means either that:
	//  * They select different objects.  If this is the case, then parentRef entries are distinct. In terms of fields, this means that the multi-part key defined by `group`, `kind`, `namespace`, and `name` must be unique across all parentRef entries in the Route. * They do not select different objects, but for each optional field used, each ParentRef that selects the same object must set the same set of optional fields to different values. If one ParentRef sets a combination of optional fields, all must set the same combination.
	//     Some examples:
	//  * If one ParentRef sets `sectionName`, all ParentRefs referencing the same object must also set `sectionName`. * If one ParentRef sets `port`, all ParentRefs referencing the same object must also set `port`. * If one ParentRef sets `sectionName` and `port`, all ParentRefs referencing the same object must also set `sectionName` and `port`.
	//     It is possible to separately reference multiple distinct objects that may be collapsed by an implementation. For example, some implementations may choose to merge compatible Gateway Listeners together. If that is the case, the list of routes attached to those resources should also be merged.
	//     Note that for ParentRefs that cross namespace boundaries, there are specific rules. Cross-namespace references are only valid if they are explicitly allowed by something in the namespace they are referring to. For example, Gateway has the AllowedRoutes field, and ReferenceGrant provides a generic way to enable other kinds of cross-namespace reference.
	//      ParentRefs from a Route to a Service in the same namespace are "producer" routes, which apply default routing rules to inbound connections from any namespace to the Service.
	//     ParentRefs from a Route to a Service in a different namespace are "consumer" routes, and these routing rules are only applied to outbound connections originating from the same namespace as the Route, for which the intended destination of the connections are a Service targeted as a ParentRef of the Route.
	ParentRefs UDPRouteSpecParentRefsArrayInput `pulumi:"parentRefs"`
	// Rules are a list of UDP matchers and actions.
	Rules UDPRouteSpecRulesArrayInput `pulumi:"rules"`
}

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

func (i UDPRouteSpecArgs) ToUDPRouteSpecOutput() UDPRouteSpecOutput {
	return i.ToUDPRouteSpecOutputWithContext(context.Background())
}

func (i UDPRouteSpecArgs) ToUDPRouteSpecOutputWithContext(ctx context.Context) UDPRouteSpecOutput {
	return pulumi.ToOutputWithContext(ctx, i).(UDPRouteSpecOutput)
}

func (i UDPRouteSpecArgs) ToOutput(ctx context.Context) pulumix.Output[UDPRouteSpec] {
	return pulumix.Output[UDPRouteSpec]{
		OutputState: i.ToUDPRouteSpecOutputWithContext(ctx).OutputState,
	}
}

func (i UDPRouteSpecArgs) ToUDPRouteSpecPtrOutput() UDPRouteSpecPtrOutput {
	return i.ToUDPRouteSpecPtrOutputWithContext(context.Background())
}

func (i UDPRouteSpecArgs) ToUDPRouteSpecPtrOutputWithContext(ctx context.Context) UDPRouteSpecPtrOutput {
	return pulumi.ToOutputWithContext(ctx, i).(UDPRouteSpecOutput).ToUDPRouteSpecPtrOutputWithContext(ctx)
}

// UDPRouteSpecPtrInput is an input type that accepts UDPRouteSpecArgs, UDPRouteSpecPtr and UDPRouteSpecPtrOutput values.
// You can construct a concrete instance of `UDPRouteSpecPtrInput` via:
//
//	        UDPRouteSpecArgs{...}
//
//	or:
//
//	        nil
type UDPRouteSpecPtrInput interface {
	pulumi.Input

	ToUDPRouteSpecPtrOutput() UDPRouteSpecPtrOutput
	ToUDPRouteSpecPtrOutputWithContext(context.Context) UDPRouteSpecPtrOutput
}

type udprouteSpecPtrType UDPRouteSpecArgs

func UDPRouteSpecPtr(v *UDPRouteSpecArgs) UDPRouteSpecPtrInput {
	return (*udprouteSpecPtrType)(v)
}

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

func (i *udprouteSpecPtrType) ToUDPRouteSpecPtrOutput() UDPRouteSpecPtrOutput {
	return i.ToUDPRouteSpecPtrOutputWithContext(context.Background())
}

func (i *udprouteSpecPtrType) ToUDPRouteSpecPtrOutputWithContext(ctx context.Context) UDPRouteSpecPtrOutput {
	return pulumi.ToOutputWithContext(ctx, i).(UDPRouteSpecPtrOutput)
}

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

// Spec defines the desired state of UDPRoute.
type UDPRouteSpecOutput struct{ *pulumi.OutputState }

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

func (o UDPRouteSpecOutput) ToUDPRouteSpecOutput() UDPRouteSpecOutput {
	return o
}

func (o UDPRouteSpecOutput) ToUDPRouteSpecOutputWithContext(ctx context.Context) UDPRouteSpecOutput {
	return o
}

func (o UDPRouteSpecOutput) ToUDPRouteSpecPtrOutput() UDPRouteSpecPtrOutput {
	return o.ToUDPRouteSpecPtrOutputWithContext(context.Background())
}

func (o UDPRouteSpecOutput) ToUDPRouteSpecPtrOutputWithContext(ctx context.Context) UDPRouteSpecPtrOutput {
	return o.ApplyTWithContext(ctx, func(_ context.Context, v UDPRouteSpec) *UDPRouteSpec {
		return &v
	}).(UDPRouteSpecPtrOutput)
}

func (o UDPRouteSpecOutput) ToOutput(ctx context.Context) pulumix.Output[UDPRouteSpec] {
	return pulumix.Output[UDPRouteSpec]{
		OutputState: o.OutputState,
	}
}

// ParentRefs references the resources (usually Gateways) that a Route wants to be attached to. Note that the referenced parent resource needs to allow this for the attachment to be complete. For Gateways, that means the Gateway needs to allow attachment from Routes of this kind and namespace. For Services, that means the Service must either be in the same namespace for a "producer" route, or the mesh implementation must support and allow "consumer" routes for the referenced Service. ReferenceGrant is not applicable for governing ParentRefs to Services - it is not possible to create a "producer" route for a Service in a different namespace from the Route.
//
//	There are two kinds of parent resources with "Core" support:
//	* Gateway (Gateway conformance profile)  * Service (Mesh conformance profile, experimental, ClusterIP Services only)  This API may be extended in the future to support additional kinds of parent resources.
//	   ParentRefs must be _distinct_. This means either that:
//	* They select different objects.  If this is the case, then parentRef entries are distinct. In terms of fields, this means that the multi-part key defined by `group`, `kind`, `namespace`, and `name` must be unique across all parentRef entries in the Route. * They do not select different objects, but for each optional field used, each ParentRef that selects the same object must set the same set of optional fields to different values. If one ParentRef sets a combination of optional fields, all must set the same combination.
//	   Some examples:
//	* If one ParentRef sets `sectionName`, all ParentRefs referencing the same object must also set `sectionName`. * If one ParentRef sets `port`, all ParentRefs referencing the same object must also set `port`. * If one ParentRef sets `sectionName` and `port`, all ParentRefs referencing the same object must also set `sectionName` and `port`.
//	   It is possible to separately reference multiple distinct objects that may be collapsed by an implementation. For example, some implementations may choose to merge compatible Gateway Listeners together. If that is the case, the list of routes attached to those resources should also be merged.
//	   Note that for ParentRefs that cross namespace boundaries, there are specific rules. Cross-namespace references are only valid if they are explicitly allowed by something in the namespace they are referring to. For example, Gateway has the AllowedRoutes field, and ReferenceGrant provides a generic way to enable other kinds of cross-namespace reference.
//	    ParentRefs from a Route to a Service in the same namespace are "producer" routes, which apply default routing rules to inbound connections from any namespace to the Service.
//	   ParentRefs from a Route to a Service in a different namespace are "consumer" routes, and these routing rules are only applied to outbound connections originating from the same namespace as the Route, for which the intended destination of the connections are a Service targeted as a ParentRef of the Route.
func (o UDPRouteSpecOutput) ParentRefs() UDPRouteSpecParentRefsArrayOutput {
	return o.ApplyT(func(v UDPRouteSpec) []UDPRouteSpecParentRefs { return v.ParentRefs }).(UDPRouteSpecParentRefsArrayOutput)
}

// Rules are a list of UDP matchers and actions.
func (o UDPRouteSpecOutput) Rules() UDPRouteSpecRulesArrayOutput {
	return o.ApplyT(func(v UDPRouteSpec) []UDPRouteSpecRules { return v.Rules }).(UDPRouteSpecRulesArrayOutput)
}

type UDPRouteSpecPtrOutput struct{ *pulumi.OutputState }

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

func (o UDPRouteSpecPtrOutput) ToUDPRouteSpecPtrOutput() UDPRouteSpecPtrOutput {
	return o
}

func (o UDPRouteSpecPtrOutput) ToUDPRouteSpecPtrOutputWithContext(ctx context.Context) UDPRouteSpecPtrOutput {
	return o
}

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

func (o UDPRouteSpecPtrOutput) Elem() UDPRouteSpecOutput {
	return o.ApplyT(func(v *UDPRouteSpec) UDPRouteSpec {
		if v != nil {
			return *v
		}
		var ret UDPRouteSpec
		return ret
	}).(UDPRouteSpecOutput)
}

// ParentRefs references the resources (usually Gateways) that a Route wants to be attached to. Note that the referenced parent resource needs to allow this for the attachment to be complete. For Gateways, that means the Gateway needs to allow attachment from Routes of this kind and namespace. For Services, that means the Service must either be in the same namespace for a "producer" route, or the mesh implementation must support and allow "consumer" routes for the referenced Service. ReferenceGrant is not applicable for governing ParentRefs to Services - it is not possible to create a "producer" route for a Service in a different namespace from the Route.
//
//	There are two kinds of parent resources with "Core" support:
//	* Gateway (Gateway conformance profile)  * Service (Mesh conformance profile, experimental, ClusterIP Services only)  This API may be extended in the future to support additional kinds of parent resources.
//	   ParentRefs must be _distinct_. This means either that:
//	* They select different objects.  If this is the case, then parentRef entries are distinct. In terms of fields, this means that the multi-part key defined by `group`, `kind`, `namespace`, and `name` must be unique across all parentRef entries in the Route. * They do not select different objects, but for each optional field used, each ParentRef that selects the same object must set the same set of optional fields to different values. If one ParentRef sets a combination of optional fields, all must set the same combination.
//	   Some examples:
//	* If one ParentRef sets `sectionName`, all ParentRefs referencing the same object must also set `sectionName`. * If one ParentRef sets `port`, all ParentRefs referencing the same object must also set `port`. * If one ParentRef sets `sectionName` and `port`, all ParentRefs referencing the same object must also set `sectionName` and `port`.
//	   It is possible to separately reference multiple distinct objects that may be collapsed by an implementation. For example, some implementations may choose to merge compatible Gateway Listeners together. If that is the case, the list of routes attached to those resources should also be merged.
//	   Note that for ParentRefs that cross namespace boundaries, there are specific rules. Cross-namespace references are only valid if they are explicitly allowed by something in the namespace they are referring to. For example, Gateway has the AllowedRoutes field, and ReferenceGrant provides a generic way to enable other kinds of cross-namespace reference.
//	    ParentRefs from a Route to a Service in the same namespace are "producer" routes, which apply default routing rules to inbound connections from any namespace to the Service.
//	   ParentRefs from a Route to a Service in a different namespace are "consumer" routes, and these routing rules are only applied to outbound connections originating from the same namespace as the Route, for which the intended destination of the connections are a Service targeted as a ParentRef of the Route.
func (o UDPRouteSpecPtrOutput) ParentRefs() UDPRouteSpecParentRefsArrayOutput {
	return o.ApplyT(func(v *UDPRouteSpec) []UDPRouteSpecParentRefs {
		if v == nil {
			return nil
		}
		return v.ParentRefs
	}).(UDPRouteSpecParentRefsArrayOutput)
}

// Rules are a list of UDP matchers and actions.
func (o UDPRouteSpecPtrOutput) Rules() UDPRouteSpecRulesArrayOutput {
	return o.ApplyT(func(v *UDPRouteSpec) []UDPRouteSpecRules {
		if v == nil {
			return nil
		}
		return v.Rules
	}).(UDPRouteSpecRulesArrayOutput)
}

// ParentReference identifies an API object (usually a Gateway) that can be considered a parent of this resource (usually a route). There are two kinds of parent resources with "Core" support:
//   - Gateway (Gateway conformance profile) * Service (Mesh conformance profile, experimental, ClusterIP Services only)
//     This API may be extended in the future to support additional kinds of parent resources.
//     The API object must be valid in the cluster; the Group and Kind must be registered in the cluster for this reference to be valid.
type UDPRouteSpecParentRefs struct {
	// Group is the group of the referent. When unspecified, "gateway.networking.k8s.io" is inferred. To set the core API group (such as for a "Service" kind referent), Group must be explicitly set to "" (empty string).
	//  Support: Core
	Group *string `pulumi:"group"`
	// Kind is kind of the referent.
	//  There are two kinds of parent resources with "Core" support:
	//  * Gateway (Gateway conformance profile) * Service (Mesh conformance profile, experimental, ClusterIP Services only)
	//     Support for other resources is Implementation-Specific.
	Kind *string `pulumi:"kind"`
	// Name is the name of the referent.
	//  Support: Core
	Name string `pulumi:"name"`
	// Namespace is the namespace of the referent. When unspecified, this refers to the local namespace of the Route.
	//  Note that there are specific rules for ParentRefs which cross namespace boundaries. Cross-namespace references are only valid if they are explicitly allowed by something in the namespace they are referring to. For example: Gateway has the AllowedRoutes field, and ReferenceGrant provides a generic way to enable any other kind of cross-namespace reference.
	//   ParentRefs from a Route to a Service in the same namespace are "producer" routes, which apply default routing rules to inbound connections from any namespace to the Service.
	//  ParentRefs from a Route to a Service in a different namespace are "consumer" routes, and these routing rules are only applied to outbound connections originating from the same namespace as the Route, for which the intended destination of the connections are a Service targeted as a ParentRef of the Route.\
	//  Support: Core
	Namespace *string `pulumi:"namespace"`
	// Port is the network port this Route targets. It can be interpreted differently based on the type of parent resource.
	//  When the parent resource is a Gateway, this targets all listeners listening on the specified port that also support this kind of Route(and select this Route). It's not recommended to set `Port` unless the networking behaviors specified in a Route must apply to a specific port as opposed to a listener(s) whose port(s) may be changed. When both Port and SectionName are specified, the name and port of the selected listener must match both specified values.
	//   When the parent resource is a Service, this targets a specific port in the Service spec. When both Port (experimental) and SectionName are specified, the name and port of the selected port must match both specified values.\
	//  Implementations MAY choose to support other parent resources. Implementations supporting other types of parent resources MUST clearly document how/if Port is interpreted.
	//  For the purpose of status, an attachment is considered successful as long as the parent resource accepts it partially. For example, Gateway listeners can restrict which Routes can attach to them by Route kind, namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from the referencing Route, the Route MUST be considered successfully attached. If no Gateway listeners accept attachment from this Route, the Route MUST be considered detached from the Gateway.
	//  Support: Extended
	Port *int `pulumi:"port"`
	// SectionName is the name of a section within the target resource. In the following resources, SectionName is interpreted as the following:
	//  * Gateway: Listener Name. When both Port (experimental) and SectionName are specified, the name and port of the selected listener must match both specified values. * Service: Port Name. When both Port (experimental) and SectionName are specified, the name and port of the selected listener must match both specified values. Note that attaching Routes to Services as Parents is part of experimental Mesh support and is not supported for any other purpose.
	//     Implementations MAY choose to support attaching Routes to other resources. If that is the case, they MUST clearly document how SectionName is interpreted.
	//     When unspecified (empty string), this will reference the entire resource. For the purpose of status, an attachment is considered successful if at least one section in the parent resource accepts it. For example, Gateway listeners can restrict which Routes can attach to them by Route kind, namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from the referencing Route, the Route MUST be considered successfully attached. If no Gateway listeners accept attachment from this Route, the Route MUST be considered detached from the Gateway.
	//     Support: Core
	SectionName *string `pulumi:"sectionName"`
}

// Defaults sets the appropriate defaults for UDPRouteSpecParentRefs
func (val *UDPRouteSpecParentRefs) Defaults() *UDPRouteSpecParentRefs {
	if val == nil {
		return nil
	}
	tmp := *val
	if tmp.Group == nil {
		group_ := "gateway.networking.k8s.io"
		tmp.Group = &group_
	}
	if tmp.Kind == nil {
		kind_ := "Gateway"
		tmp.Kind = &kind_
	}
	return &tmp
}

// UDPRouteSpecParentRefsInput is an input type that accepts UDPRouteSpecParentRefsArgs and UDPRouteSpecParentRefsOutput values.
// You can construct a concrete instance of `UDPRouteSpecParentRefsInput` via:
//
//	UDPRouteSpecParentRefsArgs{...}
type UDPRouteSpecParentRefsInput interface {
	pulumi.Input

	ToUDPRouteSpecParentRefsOutput() UDPRouteSpecParentRefsOutput
	ToUDPRouteSpecParentRefsOutputWithContext(context.Context) UDPRouteSpecParentRefsOutput
}

// ParentReference identifies an API object (usually a Gateway) that can be considered a parent of this resource (usually a route). There are two kinds of parent resources with "Core" support:
//   - Gateway (Gateway conformance profile) * Service (Mesh conformance profile, experimental, ClusterIP Services only)
//     This API may be extended in the future to support additional kinds of parent resources.
//     The API object must be valid in the cluster; the Group and Kind must be registered in the cluster for this reference to be valid.
type UDPRouteSpecParentRefsArgs struct {
	// Group is the group of the referent. When unspecified, "gateway.networking.k8s.io" is inferred. To set the core API group (such as for a "Service" kind referent), Group must be explicitly set to "" (empty string).
	//  Support: Core
	Group pulumi.StringPtrInput `pulumi:"group"`
	// Kind is kind of the referent.
	//  There are two kinds of parent resources with "Core" support:
	//  * Gateway (Gateway conformance profile) * Service (Mesh conformance profile, experimental, ClusterIP Services only)
	//     Support for other resources is Implementation-Specific.
	Kind pulumi.StringPtrInput `pulumi:"kind"`
	// Name is the name of the referent.
	//  Support: Core
	Name pulumi.StringInput `pulumi:"name"`
	// Namespace is the namespace of the referent. When unspecified, this refers to the local namespace of the Route.
	//  Note that there are specific rules for ParentRefs which cross namespace boundaries. Cross-namespace references are only valid if they are explicitly allowed by something in the namespace they are referring to. For example: Gateway has the AllowedRoutes field, and ReferenceGrant provides a generic way to enable any other kind of cross-namespace reference.
	//   ParentRefs from a Route to a Service in the same namespace are "producer" routes, which apply default routing rules to inbound connections from any namespace to the Service.
	//  ParentRefs from a Route to a Service in a different namespace are "consumer" routes, and these routing rules are only applied to outbound connections originating from the same namespace as the Route, for which the intended destination of the connections are a Service targeted as a ParentRef of the Route.\
	//  Support: Core
	Namespace pulumi.StringPtrInput `pulumi:"namespace"`
	// Port is the network port this Route targets. It can be interpreted differently based on the type of parent resource.
	//  When the parent resource is a Gateway, this targets all listeners listening on the specified port that also support this kind of Route(and select this Route). It's not recommended to set `Port` unless the networking behaviors specified in a Route must apply to a specific port as opposed to a listener(s) whose port(s) may be changed. When both Port and SectionName are specified, the name and port of the selected listener must match both specified values.
	//   When the parent resource is a Service, this targets a specific port in the Service spec. When both Port (experimental) and SectionName are specified, the name and port of the selected port must match both specified values.\
	//  Implementations MAY choose to support other parent resources. Implementations supporting other types of parent resources MUST clearly document how/if Port is interpreted.
	//  For the purpose of status, an attachment is considered successful as long as the parent resource accepts it partially. For example, Gateway listeners can restrict which Routes can attach to them by Route kind, namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from the referencing Route, the Route MUST be considered successfully attached. If no Gateway listeners accept attachment from this Route, the Route MUST be considered detached from the Gateway.
	//  Support: Extended
	Port pulumi.IntPtrInput `pulumi:"port"`
	// SectionName is the name of a section within the target resource. In the following resources, SectionName is interpreted as the following:
	//  * Gateway: Listener Name. When both Port (experimental) and SectionName are specified, the name and port of the selected listener must match both specified values. * Service: Port Name. When both Port (experimental) and SectionName are specified, the name and port of the selected listener must match both specified values. Note that attaching Routes to Services as Parents is part of experimental Mesh support and is not supported for any other purpose.
	//     Implementations MAY choose to support attaching Routes to other resources. If that is the case, they MUST clearly document how SectionName is interpreted.
	//     When unspecified (empty string), this will reference the entire resource. For the purpose of status, an attachment is considered successful if at least one section in the parent resource accepts it. For example, Gateway listeners can restrict which Routes can attach to them by Route kind, namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from the referencing Route, the Route MUST be considered successfully attached. If no Gateway listeners accept attachment from this Route, the Route MUST be considered detached from the Gateway.
	//     Support: Core
	SectionName pulumi.StringPtrInput `pulumi:"sectionName"`
}

// Defaults sets the appropriate defaults for UDPRouteSpecParentRefsArgs
func (val *UDPRouteSpecParentRefsArgs) Defaults() *UDPRouteSpecParentRefsArgs {
	if val == nil {
		return nil
	}
	tmp := *val
	if tmp.Group == nil {
		tmp.Group = pulumi.StringPtr("gateway.networking.k8s.io")
	}
	if tmp.Kind == nil {
		tmp.Kind = pulumi.StringPtr("Gateway")
	}
	return &tmp
}
func (UDPRouteSpecParentRefsArgs) ElementType() reflect.Type {
	return reflect.TypeOf((*UDPRouteSpecParentRefs)(nil)).Elem()
}

func (i UDPRouteSpecParentRefsArgs) ToUDPRouteSpecParentRefsOutput() UDPRouteSpecParentRefsOutput {
	return i.ToUDPRouteSpecParentRefsOutputWithContext(context.Background())
}

func (i UDPRouteSpecParentRefsArgs) ToUDPRouteSpecParentRefsOutputWithContext(ctx context.Context) UDPRouteSpecParentRefsOutput {
	return pulumi.ToOutputWithContext(ctx, i).(UDPRouteSpecParentRefsOutput)
}

func (i UDPRouteSpecParentRefsArgs) ToOutput(ctx context.Context) pulumix.Output[UDPRouteSpecParentRefs] {
	return pulumix.Output[UDPRouteSpecParentRefs]{
		OutputState: i.ToUDPRouteSpecParentRefsOutputWithContext(ctx).OutputState,
	}
}

// UDPRouteSpecParentRefsArrayInput is an input type that accepts UDPRouteSpecParentRefsArray and UDPRouteSpecParentRefsArrayOutput values.
// You can construct a concrete instance of `UDPRouteSpecParentRefsArrayInput` via:
//
//	UDPRouteSpecParentRefsArray{ UDPRouteSpecParentRefsArgs{...} }
type UDPRouteSpecParentRefsArrayInput interface {
	pulumi.Input

	ToUDPRouteSpecParentRefsArrayOutput() UDPRouteSpecParentRefsArrayOutput
	ToUDPRouteSpecParentRefsArrayOutputWithContext(context.Context) UDPRouteSpecParentRefsArrayOutput
}

type UDPRouteSpecParentRefsArray []UDPRouteSpecParentRefsInput

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

func (i UDPRouteSpecParentRefsArray) ToUDPRouteSpecParentRefsArrayOutput() UDPRouteSpecParentRefsArrayOutput {
	return i.ToUDPRouteSpecParentRefsArrayOutputWithContext(context.Background())
}

func (i UDPRouteSpecParentRefsArray) ToUDPRouteSpecParentRefsArrayOutputWithContext(ctx context.Context) UDPRouteSpecParentRefsArrayOutput {
	return pulumi.ToOutputWithContext(ctx, i).(UDPRouteSpecParentRefsArrayOutput)
}

func (i UDPRouteSpecParentRefsArray) ToOutput(ctx context.Context) pulumix.Output[[]UDPRouteSpecParentRefs] {
	return pulumix.Output[[]UDPRouteSpecParentRefs]{
		OutputState: i.ToUDPRouteSpecParentRefsArrayOutputWithContext(ctx).OutputState,
	}
}

// ParentReference identifies an API object (usually a Gateway) that can be considered a parent of this resource (usually a route). There are two kinds of parent resources with "Core" support:
//   - Gateway (Gateway conformance profile) * Service (Mesh conformance profile, experimental, ClusterIP Services only)
//     This API may be extended in the future to support additional kinds of parent resources.
//     The API object must be valid in the cluster; the Group and Kind must be registered in the cluster for this reference to be valid.
type UDPRouteSpecParentRefsOutput struct{ *pulumi.OutputState }

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

func (o UDPRouteSpecParentRefsOutput) ToUDPRouteSpecParentRefsOutput() UDPRouteSpecParentRefsOutput {
	return o
}

func (o UDPRouteSpecParentRefsOutput) ToUDPRouteSpecParentRefsOutputWithContext(ctx context.Context) UDPRouteSpecParentRefsOutput {
	return o
}

func (o UDPRouteSpecParentRefsOutput) ToOutput(ctx context.Context) pulumix.Output[UDPRouteSpecParentRefs] {
	return pulumix.Output[UDPRouteSpecParentRefs]{
		OutputState: o.OutputState,
	}
}

// Group is the group of the referent. When unspecified, "gateway.networking.k8s.io" is inferred. To set the core API group (such as for a "Service" kind referent), Group must be explicitly set to "" (empty string).
//
//	Support: Core
func (o UDPRouteSpecParentRefsOutput) Group() pulumi.StringPtrOutput {
	return o.ApplyT(func(v UDPRouteSpecParentRefs) *string { return v.Group }).(pulumi.StringPtrOutput)
}

// Kind is kind of the referent.
//
//	There are two kinds of parent resources with "Core" support:
//	* Gateway (Gateway conformance profile) * Service (Mesh conformance profile, experimental, ClusterIP Services only)
//	   Support for other resources is Implementation-Specific.
func (o UDPRouteSpecParentRefsOutput) Kind() pulumi.StringPtrOutput {
	return o.ApplyT(func(v UDPRouteSpecParentRefs) *string { return v.Kind }).(pulumi.StringPtrOutput)
}

// Name is the name of the referent.
//
//	Support: Core
func (o UDPRouteSpecParentRefsOutput) Name() pulumi.StringOutput {
	return o.ApplyT(func(v UDPRouteSpecParentRefs) string { return v.Name }).(pulumi.StringOutput)
}

// Namespace is the namespace of the referent. When unspecified, this refers to the local namespace of the Route.
//
//	Note that there are specific rules for ParentRefs which cross namespace boundaries. Cross-namespace references are only valid if they are explicitly allowed by something in the namespace they are referring to. For example: Gateway has the AllowedRoutes field, and ReferenceGrant provides a generic way to enable any other kind of cross-namespace reference.
//	 ParentRefs from a Route to a Service in the same namespace are "producer" routes, which apply default routing rules to inbound connections from any namespace to the Service.
//	ParentRefs from a Route to a Service in a different namespace are "consumer" routes, and these routing rules are only applied to outbound connections originating from the same namespace as the Route, for which the intended destination of the connections are a Service targeted as a ParentRef of the Route.\
//	Support: Core
func (o UDPRouteSpecParentRefsOutput) Namespace() pulumi.StringPtrOutput {
	return o.ApplyT(func(v UDPRouteSpecParentRefs) *string { return v.Namespace }).(pulumi.StringPtrOutput)
}

// Port is the network port this Route targets. It can be interpreted differently based on the type of parent resource.
//
//	When the parent resource is a Gateway, this targets all listeners listening on the specified port that also support this kind of Route(and select this Route). It's not recommended to set `Port` unless the networking behaviors specified in a Route must apply to a specific port as opposed to a listener(s) whose port(s) may be changed. When both Port and SectionName are specified, the name and port of the selected listener must match both specified values.
//	 When the parent resource is a Service, this targets a specific port in the Service spec. When both Port (experimental) and SectionName are specified, the name and port of the selected port must match both specified values.\
//	Implementations MAY choose to support other parent resources. Implementations supporting other types of parent resources MUST clearly document how/if Port is interpreted.
//	For the purpose of status, an attachment is considered successful as long as the parent resource accepts it partially. For example, Gateway listeners can restrict which Routes can attach to them by Route kind, namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from the referencing Route, the Route MUST be considered successfully attached. If no Gateway listeners accept attachment from this Route, the Route MUST be considered detached from the Gateway.
//	Support: Extended
func (o UDPRouteSpecParentRefsOutput) Port() pulumi.IntPtrOutput {
	return o.ApplyT(func(v UDPRouteSpecParentRefs) *int { return v.Port }).(pulumi.IntPtrOutput)
}

// SectionName is the name of a section within the target resource. In the following resources, SectionName is interpreted as the following:
//   - Gateway: Listener Name. When both Port (experimental) and SectionName are specified, the name and port of the selected listener must match both specified values. * Service: Port Name. When both Port (experimental) and SectionName are specified, the name and port of the selected listener must match both specified values. Note that attaching Routes to Services as Parents is part of experimental Mesh support and is not supported for any other purpose.
//     Implementations MAY choose to support attaching Routes to other resources. If that is the case, they MUST clearly document how SectionName is interpreted.
//     When unspecified (empty string), this will reference the entire resource. For the purpose of status, an attachment is considered successful if at least one section in the parent resource accepts it. For example, Gateway listeners can restrict which Routes can attach to them by Route kind, namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from the referencing Route, the Route MUST be considered successfully attached. If no Gateway listeners accept attachment from this Route, the Route MUST be considered detached from the Gateway.
//     Support: Core
func (o UDPRouteSpecParentRefsOutput) SectionName() pulumi.StringPtrOutput {
	return o.ApplyT(func(v UDPRouteSpecParentRefs) *string { return v.SectionName }).(pulumi.StringPtrOutput)
}

type UDPRouteSpecParentRefsArrayOutput struct{ *pulumi.OutputState }

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

func (o UDPRouteSpecParentRefsArrayOutput) ToUDPRouteSpecParentRefsArrayOutput() UDPRouteSpecParentRefsArrayOutput {
	return o
}

func (o UDPRouteSpecParentRefsArrayOutput) ToUDPRouteSpecParentRefsArrayOutputWithContext(ctx context.Context) UDPRouteSpecParentRefsArrayOutput {
	return o
}

func (o UDPRouteSpecParentRefsArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]UDPRouteSpecParentRefs] {
	return pulumix.Output[[]UDPRouteSpecParentRefs]{
		OutputState: o.OutputState,
	}
}

func (o UDPRouteSpecParentRefsArrayOutput) Index(i pulumi.IntInput) UDPRouteSpecParentRefsOutput {
	return pulumi.All(o, i).ApplyT(func(vs []interface{}) UDPRouteSpecParentRefs {
		return vs[0].([]UDPRouteSpecParentRefs)[vs[1].(int)]
	}).(UDPRouteSpecParentRefsOutput)
}

// UDPRouteRule is the configuration for a given rule.
type UDPRouteSpecRules struct {
	// BackendRefs defines the backend(s) where matching requests should be sent. If unspecified or invalid (refers to a non-existent resource or a Service with no endpoints), the underlying implementation MUST actively reject connection attempts to this backend. Packet drops must respect weight; if an invalid backend is requested to have 80% of the packets, then 80% of packets must be dropped instead.
	//  Support: Core for Kubernetes Service
	//  Support: Extended for Kubernetes ServiceImport
	//  Support: Implementation-specific for any other resource
	//  Support for weight: Extended
	BackendRefs []UDPRouteSpecRulesBackendRefs `pulumi:"backendRefs"`
}

// UDPRouteSpecRulesInput is an input type that accepts UDPRouteSpecRulesArgs and UDPRouteSpecRulesOutput values.
// You can construct a concrete instance of `UDPRouteSpecRulesInput` via:
//
//	UDPRouteSpecRulesArgs{...}
type UDPRouteSpecRulesInput interface {
	pulumi.Input

	ToUDPRouteSpecRulesOutput() UDPRouteSpecRulesOutput
	ToUDPRouteSpecRulesOutputWithContext(context.Context) UDPRouteSpecRulesOutput
}

// UDPRouteRule is the configuration for a given rule.
type UDPRouteSpecRulesArgs struct {
	// BackendRefs defines the backend(s) where matching requests should be sent. If unspecified or invalid (refers to a non-existent resource or a Service with no endpoints), the underlying implementation MUST actively reject connection attempts to this backend. Packet drops must respect weight; if an invalid backend is requested to have 80% of the packets, then 80% of packets must be dropped instead.
	//  Support: Core for Kubernetes Service
	//  Support: Extended for Kubernetes ServiceImport
	//  Support: Implementation-specific for any other resource
	//  Support for weight: Extended
	BackendRefs UDPRouteSpecRulesBackendRefsArrayInput `pulumi:"backendRefs"`
}

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

func (i UDPRouteSpecRulesArgs) ToUDPRouteSpecRulesOutput() UDPRouteSpecRulesOutput {
	return i.ToUDPRouteSpecRulesOutputWithContext(context.Background())
}

func (i UDPRouteSpecRulesArgs) ToUDPRouteSpecRulesOutputWithContext(ctx context.Context) UDPRouteSpecRulesOutput {
	return pulumi.ToOutputWithContext(ctx, i).(UDPRouteSpecRulesOutput)
}

func (i UDPRouteSpecRulesArgs) ToOutput(ctx context.Context) pulumix.Output[UDPRouteSpecRules] {
	return pulumix.Output[UDPRouteSpecRules]{
		OutputState: i.ToUDPRouteSpecRulesOutputWithContext(ctx).OutputState,
	}
}

// UDPRouteSpecRulesArrayInput is an input type that accepts UDPRouteSpecRulesArray and UDPRouteSpecRulesArrayOutput values.
// You can construct a concrete instance of `UDPRouteSpecRulesArrayInput` via:
//
//	UDPRouteSpecRulesArray{ UDPRouteSpecRulesArgs{...} }
type UDPRouteSpecRulesArrayInput interface {
	pulumi.Input

	ToUDPRouteSpecRulesArrayOutput() UDPRouteSpecRulesArrayOutput
	ToUDPRouteSpecRulesArrayOutputWithContext(context.Context) UDPRouteSpecRulesArrayOutput
}

type UDPRouteSpecRulesArray []UDPRouteSpecRulesInput

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

func (i UDPRouteSpecRulesArray) ToUDPRouteSpecRulesArrayOutput() UDPRouteSpecRulesArrayOutput {
	return i.ToUDPRouteSpecRulesArrayOutputWithContext(context.Background())
}

func (i UDPRouteSpecRulesArray) ToUDPRouteSpecRulesArrayOutputWithContext(ctx context.Context) UDPRouteSpecRulesArrayOutput {
	return pulumi.ToOutputWithContext(ctx, i).(UDPRouteSpecRulesArrayOutput)
}

func (i UDPRouteSpecRulesArray) ToOutput(ctx context.Context) pulumix.Output[[]UDPRouteSpecRules] {
	return pulumix.Output[[]UDPRouteSpecRules]{
		OutputState: i.ToUDPRouteSpecRulesArrayOutputWithContext(ctx).OutputState,
	}
}

// UDPRouteRule is the configuration for a given rule.
type UDPRouteSpecRulesOutput struct{ *pulumi.OutputState }

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

func (o UDPRouteSpecRulesOutput) ToUDPRouteSpecRulesOutput() UDPRouteSpecRulesOutput {
	return o
}

func (o UDPRouteSpecRulesOutput) ToUDPRouteSpecRulesOutputWithContext(ctx context.Context) UDPRouteSpecRulesOutput {
	return o
}

func (o UDPRouteSpecRulesOutput) ToOutput(ctx context.Context) pulumix.Output[UDPRouteSpecRules] {
	return pulumix.Output[UDPRouteSpecRules]{
		OutputState: o.OutputState,
	}
}

// BackendRefs defines the backend(s) where matching requests should be sent. If unspecified or invalid (refers to a non-existent resource or a Service with no endpoints), the underlying implementation MUST actively reject connection attempts to this backend. Packet drops must respect weight; if an invalid backend is requested to have 80% of the packets, then 80% of packets must be dropped instead.
//
//	Support: Core for Kubernetes Service
//	Support: Extended for Kubernetes ServiceImport
//	Support: Implementation-specific for any other resource
//	Support for weight: Extended
func (o UDPRouteSpecRulesOutput) BackendRefs() UDPRouteSpecRulesBackendRefsArrayOutput {
	return o.ApplyT(func(v UDPRouteSpecRules) []UDPRouteSpecRulesBackendRefs { return v.BackendRefs }).(UDPRouteSpecRulesBackendRefsArrayOutput)
}

type UDPRouteSpecRulesArrayOutput struct{ *pulumi.OutputState }

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

func (o UDPRouteSpecRulesArrayOutput) ToUDPRouteSpecRulesArrayOutput() UDPRouteSpecRulesArrayOutput {
	return o
}

func (o UDPRouteSpecRulesArrayOutput) ToUDPRouteSpecRulesArrayOutputWithContext(ctx context.Context) UDPRouteSpecRulesArrayOutput {
	return o
}

func (o UDPRouteSpecRulesArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]UDPRouteSpecRules] {
	return pulumix.Output[[]UDPRouteSpecRules]{
		OutputState: o.OutputState,
	}
}

func (o UDPRouteSpecRulesArrayOutput) Index(i pulumi.IntInput) UDPRouteSpecRulesOutput {
	return pulumi.All(o, i).ApplyT(func(vs []interface{}) UDPRouteSpecRules {
		return vs[0].([]UDPRouteSpecRules)[vs[1].(int)]
	}).(UDPRouteSpecRulesOutput)
}

// BackendRef defines how a Route should forward a request to a Kubernetes resource.
//
//	Note that when a namespace different than the local namespace is specified, a ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details.
//	<gateway:experimental:description>
//	When the BackendRef points to a Kubernetes Service, implementations SHOULD honor the appProtocol field if it is set for the target Service Port.
//	Implementations supporting appProtocol SHOULD recognize the Kubernetes Standard Application Protocols defined in KEP-3726.
//	If a Service appProtocol isn't specified, an implementation MAY infer the backend protocol through its own means. Implementations MAY infer the protocol from the Route type referring to the backend Service.
//	If a Route is not able to send traffic to the backend using the specified protocol then the backend is considered invalid. Implementations MUST set the "ResolvedRefs" condition to "False" with the "UnsupportedProtocol" reason.
//	</gateway:experimental:description>
//	Note that when the BackendTLSPolicy object is enabled by the implementation, there are some extra rules about validity to consider here. See the fields where this struct is used for more information about the exact behavior.
type UDPRouteSpecRulesBackendRefs struct {
	// Group is the group of the referent. For example, "gateway.networking.k8s.io". When unspecified or empty string, core API group is inferred.
	Group *string `pulumi:"group"`
	// Kind is the Kubernetes resource kind of the referent. For example "Service".
	//  Defaults to "Service" when not specified.
	//  ExternalName services can refer to CNAME DNS records that may live outside of the cluster and as such are difficult to reason about in terms of conformance. They also may not be safe to forward to (see CVE-2021-25740 for more information). Implementations SHOULD NOT support ExternalName Services.
	//  Support: Core (Services with a type other than ExternalName)
	//  Support: Implementation-specific (Services with type ExternalName)
	Kind *string `pulumi:"kind"`
	// Name is the name of the referent.
	Name string `pulumi:"name"`
	// Namespace is the namespace of the backend. When unspecified, the local namespace is inferred.
	//  Note that when a namespace different than the local namespace is specified, a ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details.
	//  Support: Core
	Namespace *string `pulumi:"namespace"`
	// Port specifies the destination port number to use for this resource. Port is required when the referent is a Kubernetes Service. In this case, the port number is the service port number, not the target port. For other resources, destination port might be derived from the referent resource or this field.
	Port *int `pulumi:"port"`
	// Weight specifies the proportion of requests forwarded to the referenced backend. This is computed as weight/(sum of all weights in this BackendRefs list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. Weight is not a percentage and the sum of weights does not need to equal 100.
	//  If only one backend is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weight is set to 0, no traffic should be forwarded for this entry. If unspecified, weight defaults to 1.
	//  Support for this field varies based on the context where used.
	Weight *int `pulumi:"weight"`
}

// Defaults sets the appropriate defaults for UDPRouteSpecRulesBackendRefs
func (val *UDPRouteSpecRulesBackendRefs) Defaults() *UDPRouteSpecRulesBackendRefs {
	if val == nil {
		return nil
	}
	tmp := *val
	if tmp.Group == nil {
		group_ := ""
		tmp.Group = &group_
	}
	if tmp.Kind == nil {
		kind_ := "Service"
		tmp.Kind = &kind_
	}
	if tmp.Weight == nil {
		weight_ := 1
		tmp.Weight = &weight_
	}
	return &tmp
}

// UDPRouteSpecRulesBackendRefsInput is an input type that accepts UDPRouteSpecRulesBackendRefsArgs and UDPRouteSpecRulesBackendRefsOutput values.
// You can construct a concrete instance of `UDPRouteSpecRulesBackendRefsInput` via:
//
//	UDPRouteSpecRulesBackendRefsArgs{...}
type UDPRouteSpecRulesBackendRefsInput interface {
	pulumi.Input

	ToUDPRouteSpecRulesBackendRefsOutput() UDPRouteSpecRulesBackendRefsOutput
	ToUDPRouteSpecRulesBackendRefsOutputWithContext(context.Context) UDPRouteSpecRulesBackendRefsOutput
}

// BackendRef defines how a Route should forward a request to a Kubernetes resource.
//
//	Note that when a namespace different than the local namespace is specified, a ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details.
//	<gateway:experimental:description>
//	When the BackendRef points to a Kubernetes Service, implementations SHOULD honor the appProtocol field if it is set for the target Service Port.
//	Implementations supporting appProtocol SHOULD recognize the Kubernetes Standard Application Protocols defined in KEP-3726.
//	If a Service appProtocol isn't specified, an implementation MAY infer the backend protocol through its own means. Implementations MAY infer the protocol from the Route type referring to the backend Service.
//	If a Route is not able to send traffic to the backend using the specified protocol then the backend is considered invalid. Implementations MUST set the "ResolvedRefs" condition to "False" with the "UnsupportedProtocol" reason.
//	</gateway:experimental:description>
//	Note that when the BackendTLSPolicy object is enabled by the implementation, there are some extra rules about validity to consider here. See the fields where this struct is used for more information about the exact behavior.
type UDPRouteSpecRulesBackendRefsArgs struct {
	// Group is the group of the referent. For example, "gateway.networking.k8s.io". When unspecified or empty string, core API group is inferred.
	Group pulumi.StringPtrInput `pulumi:"group"`
	// Kind is the Kubernetes resource kind of the referent. For example "Service".
	//  Defaults to "Service" when not specified.
	//  ExternalName services can refer to CNAME DNS records that may live outside of the cluster and as such are difficult to reason about in terms of conformance. They also may not be safe to forward to (see CVE-2021-25740 for more information). Implementations SHOULD NOT support ExternalName Services.
	//  Support: Core (Services with a type other than ExternalName)
	//  Support: Implementation-specific (Services with type ExternalName)
	Kind pulumi.StringPtrInput `pulumi:"kind"`
	// Name is the name of the referent.
	Name pulumi.StringInput `pulumi:"name"`
	// Namespace is the namespace of the backend. When unspecified, the local namespace is inferred.
	//  Note that when a namespace different than the local namespace is specified, a ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details.
	//  Support: Core
	Namespace pulumi.StringPtrInput `pulumi:"namespace"`
	// Port specifies the destination port number to use for this resource. Port is required when the referent is a Kubernetes Service. In this case, the port number is the service port number, not the target port. For other resources, destination port might be derived from the referent resource or this field.
	Port pulumi.IntPtrInput `pulumi:"port"`
	// Weight specifies the proportion of requests forwarded to the referenced backend. This is computed as weight/(sum of all weights in this BackendRefs list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. Weight is not a percentage and the sum of weights does not need to equal 100.
	//  If only one backend is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weight is set to 0, no traffic should be forwarded for this entry. If unspecified, weight defaults to 1.
	//  Support for this field varies based on the context where used.
	Weight pulumi.IntPtrInput `pulumi:"weight"`
}

// Defaults sets the appropriate defaults for UDPRouteSpecRulesBackendRefsArgs
func (val *UDPRouteSpecRulesBackendRefsArgs) Defaults() *UDPRouteSpecRulesBackendRefsArgs {
	if val == nil {
		return nil
	}
	tmp := *val
	if tmp.Group == nil {
		tmp.Group = pulumi.StringPtr("")
	}
	if tmp.Kind == nil {
		tmp.Kind = pulumi.StringPtr("Service")
	}
	if tmp.Weight == nil {
		tmp.Weight = pulumi.IntPtr(1)
	}
	return &tmp
}
func (UDPRouteSpecRulesBackendRefsArgs) ElementType() reflect.Type {
	return reflect.TypeOf((*UDPRouteSpecRulesBackendRefs)(nil)).Elem()
}

func (i UDPRouteSpecRulesBackendRefsArgs) ToUDPRouteSpecRulesBackendRefsOutput() UDPRouteSpecRulesBackendRefsOutput {
	return i.ToUDPRouteSpecRulesBackendRefsOutputWithContext(context.Background())
}

func (i UDPRouteSpecRulesBackendRefsArgs) ToUDPRouteSpecRulesBackendRefsOutputWithContext(ctx context.Context) UDPRouteSpecRulesBackendRefsOutput {
	return pulumi.ToOutputWithContext(ctx, i).(UDPRouteSpecRulesBackendRefsOutput)
}

func (i UDPRouteSpecRulesBackendRefsArgs) ToOutput(ctx context.Context) pulumix.Output[UDPRouteSpecRulesBackendRefs] {
	return pulumix.Output[UDPRouteSpecRulesBackendRefs]{
		OutputState: i.ToUDPRouteSpecRulesBackendRefsOutputWithContext(ctx).OutputState,
	}
}

// UDPRouteSpecRulesBackendRefsArrayInput is an input type that accepts UDPRouteSpecRulesBackendRefsArray and UDPRouteSpecRulesBackendRefsArrayOutput values.
// You can construct a concrete instance of `UDPRouteSpecRulesBackendRefsArrayInput` via:
//
//	UDPRouteSpecRulesBackendRefsArray{ UDPRouteSpecRulesBackendRefsArgs{...} }
type UDPRouteSpecRulesBackendRefsArrayInput interface {
	pulumi.Input

	ToUDPRouteSpecRulesBackendRefsArrayOutput() UDPRouteSpecRulesBackendRefsArrayOutput
	ToUDPRouteSpecRulesBackendRefsArrayOutputWithContext(context.Context) UDPRouteSpecRulesBackendRefsArrayOutput
}

type UDPRouteSpecRulesBackendRefsArray []UDPRouteSpecRulesBackendRefsInput

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

func (i UDPRouteSpecRulesBackendRefsArray) ToUDPRouteSpecRulesBackendRefsArrayOutput() UDPRouteSpecRulesBackendRefsArrayOutput {
	return i.ToUDPRouteSpecRulesBackendRefsArrayOutputWithContext(context.Background())
}

func (i UDPRouteSpecRulesBackendRefsArray) ToUDPRouteSpecRulesBackendRefsArrayOutputWithContext(ctx context.Context) UDPRouteSpecRulesBackendRefsArrayOutput {
	return pulumi.ToOutputWithContext(ctx, i).(UDPRouteSpecRulesBackendRefsArrayOutput)
}

func (i UDPRouteSpecRulesBackendRefsArray) ToOutput(ctx context.Context) pulumix.Output[[]UDPRouteSpecRulesBackendRefs] {
	return pulumix.Output[[]UDPRouteSpecRulesBackendRefs]{
		OutputState: i.ToUDPRouteSpecRulesBackendRefsArrayOutputWithContext(ctx).OutputState,
	}
}

// BackendRef defines how a Route should forward a request to a Kubernetes resource.
//
//	Note that when a namespace different than the local namespace is specified, a ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details.
//	<gateway:experimental:description>
//	When the BackendRef points to a Kubernetes Service, implementations SHOULD honor the appProtocol field if it is set for the target Service Port.
//	Implementations supporting appProtocol SHOULD recognize the Kubernetes Standard Application Protocols defined in KEP-3726.
//	If a Service appProtocol isn't specified, an implementation MAY infer the backend protocol through its own means. Implementations MAY infer the protocol from the Route type referring to the backend Service.
//	If a Route is not able to send traffic to the backend using the specified protocol then the backend is considered invalid. Implementations MUST set the "ResolvedRefs" condition to "False" with the "UnsupportedProtocol" reason.
//	</gateway:experimental:description>
//	Note that when the BackendTLSPolicy object is enabled by the implementation, there are some extra rules about validity to consider here. See the fields where this struct is used for more information about the exact behavior.
type UDPRouteSpecRulesBackendRefsOutput struct{ *pulumi.OutputState }

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

func (o UDPRouteSpecRulesBackendRefsOutput) ToUDPRouteSpecRulesBackendRefsOutput() UDPRouteSpecRulesBackendRefsOutput {
	return o
}

func (o UDPRouteSpecRulesBackendRefsOutput) ToUDPRouteSpecRulesBackendRefsOutputWithContext(ctx context.Context) UDPRouteSpecRulesBackendRefsOutput {
	return o
}

func (o UDPRouteSpecRulesBackendRefsOutput) ToOutput(ctx context.Context) pulumix.Output[UDPRouteSpecRulesBackendRefs] {
	return pulumix.Output[UDPRouteSpecRulesBackendRefs]{
		OutputState: o.OutputState,
	}
}

// Group is the group of the referent. For example, "gateway.networking.k8s.io". When unspecified or empty string, core API group is inferred.
func (o UDPRouteSpecRulesBackendRefsOutput) Group() pulumi.StringPtrOutput {
	return o.ApplyT(func(v UDPRouteSpecRulesBackendRefs) *string { return v.Group }).(pulumi.StringPtrOutput)
}

// Kind is the Kubernetes resource kind of the referent. For example "Service".
//
//	Defaults to "Service" when not specified.
//	ExternalName services can refer to CNAME DNS records that may live outside of the cluster and as such are difficult to reason about in terms of conformance. They also may not be safe to forward to (see CVE-2021-25740 for more information). Implementations SHOULD NOT support ExternalName Services.
//	Support: Core (Services with a type other than ExternalName)
//	Support: Implementation-specific (Services with type ExternalName)
func (o UDPRouteSpecRulesBackendRefsOutput) Kind() pulumi.StringPtrOutput {
	return o.ApplyT(func(v UDPRouteSpecRulesBackendRefs) *string { return v.Kind }).(pulumi.StringPtrOutput)
}

// Name is the name of the referent.
func (o UDPRouteSpecRulesBackendRefsOutput) Name() pulumi.StringOutput {
	return o.ApplyT(func(v UDPRouteSpecRulesBackendRefs) string { return v.Name }).(pulumi.StringOutput)
}

// Namespace is the namespace of the backend. When unspecified, the local namespace is inferred.
//
//	Note that when a namespace different than the local namespace is specified, a ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details.
//	Support: Core
func (o UDPRouteSpecRulesBackendRefsOutput) Namespace() pulumi.StringPtrOutput {
	return o.ApplyT(func(v UDPRouteSpecRulesBackendRefs) *string { return v.Namespace }).(pulumi.StringPtrOutput)
}

// Port specifies the destination port number to use for this resource. Port is required when the referent is a Kubernetes Service. In this case, the port number is the service port number, not the target port. For other resources, destination port might be derived from the referent resource or this field.
func (o UDPRouteSpecRulesBackendRefsOutput) Port() pulumi.IntPtrOutput {
	return o.ApplyT(func(v UDPRouteSpecRulesBackendRefs) *int { return v.Port }).(pulumi.IntPtrOutput)
}

// Weight specifies the proportion of requests forwarded to the referenced backend. This is computed as weight/(sum of all weights in this BackendRefs list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. Weight is not a percentage and the sum of weights does not need to equal 100.
//
//	If only one backend is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weight is set to 0, no traffic should be forwarded for this entry. If unspecified, weight defaults to 1.
//	Support for this field varies based on the context where used.
func (o UDPRouteSpecRulesBackendRefsOutput) Weight() pulumi.IntPtrOutput {
	return o.ApplyT(func(v UDPRouteSpecRulesBackendRefs) *int { return v.Weight }).(pulumi.IntPtrOutput)
}

type UDPRouteSpecRulesBackendRefsArrayOutput struct{ *pulumi.OutputState }

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

func (o UDPRouteSpecRulesBackendRefsArrayOutput) ToUDPRouteSpecRulesBackendRefsArrayOutput() UDPRouteSpecRulesBackendRefsArrayOutput {
	return o
}

func (o UDPRouteSpecRulesBackendRefsArrayOutput) ToUDPRouteSpecRulesBackendRefsArrayOutputWithContext(ctx context.Context) UDPRouteSpecRulesBackendRefsArrayOutput {
	return o
}

func (o UDPRouteSpecRulesBackendRefsArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]UDPRouteSpecRulesBackendRefs] {
	return pulumix.Output[[]UDPRouteSpecRulesBackendRefs]{
		OutputState: o.OutputState,
	}
}

func (o UDPRouteSpecRulesBackendRefsArrayOutput) Index(i pulumi.IntInput) UDPRouteSpecRulesBackendRefsOutput {
	return pulumi.All(o, i).ApplyT(func(vs []interface{}) UDPRouteSpecRulesBackendRefs {
		return vs[0].([]UDPRouteSpecRulesBackendRefs)[vs[1].(int)]
	}).(UDPRouteSpecRulesBackendRefsOutput)
}

// Status defines the current state of UDPRoute.
type UDPRouteStatus struct {
	// Parents is a list of parent resources (usually Gateways) that are associated with the route, and the status of the route with respect to each parent. When this route attaches to a parent, the controller that manages the parent must add an entry to this list when the controller first sees the route and should update the entry as appropriate when the route or gateway is modified.
	//  Note that parent references that cannot be resolved by an implementation of this API will not be added to this list. Implementations of this API can only populate Route status for the Gateways/parent resources they are responsible for.
	//  A maximum of 32 Gateways will be represented in this list. An empty list means the route has not been attached to any Gateway.
	Parents []UDPRouteStatusParents `pulumi:"parents"`
}

// UDPRouteStatusInput is an input type that accepts UDPRouteStatusArgs and UDPRouteStatusOutput values.
// You can construct a concrete instance of `UDPRouteStatusInput` via:
//
//	UDPRouteStatusArgs{...}
type UDPRouteStatusInput interface {
	pulumi.Input

	ToUDPRouteStatusOutput() UDPRouteStatusOutput
	ToUDPRouteStatusOutputWithContext(context.Context) UDPRouteStatusOutput
}

// Status defines the current state of UDPRoute.
type UDPRouteStatusArgs struct {
	// Parents is a list of parent resources (usually Gateways) that are associated with the route, and the status of the route with respect to each parent. When this route attaches to a parent, the controller that manages the parent must add an entry to this list when the controller first sees the route and should update the entry as appropriate when the route or gateway is modified.
	//  Note that parent references that cannot be resolved by an implementation of this API will not be added to this list. Implementations of this API can only populate Route status for the Gateways/parent resources they are responsible for.
	//  A maximum of 32 Gateways will be represented in this list. An empty list means the route has not been attached to any Gateway.
	Parents UDPRouteStatusParentsArrayInput `pulumi:"parents"`
}

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

func (i UDPRouteStatusArgs) ToUDPRouteStatusOutput() UDPRouteStatusOutput {
	return i.ToUDPRouteStatusOutputWithContext(context.Background())
}

func (i UDPRouteStatusArgs) ToUDPRouteStatusOutputWithContext(ctx context.Context) UDPRouteStatusOutput {
	return pulumi.ToOutputWithContext(ctx, i).(UDPRouteStatusOutput)
}

func (i UDPRouteStatusArgs) ToOutput(ctx context.Context) pulumix.Output[UDPRouteStatus] {
	return pulumix.Output[UDPRouteStatus]{
		OutputState: i.ToUDPRouteStatusOutputWithContext(ctx).OutputState,
	}
}

func (i UDPRouteStatusArgs) ToUDPRouteStatusPtrOutput() UDPRouteStatusPtrOutput {
	return i.ToUDPRouteStatusPtrOutputWithContext(context.Background())
}

func (i UDPRouteStatusArgs) ToUDPRouteStatusPtrOutputWithContext(ctx context.Context) UDPRouteStatusPtrOutput {
	return pulumi.ToOutputWithContext(ctx, i).(UDPRouteStatusOutput).ToUDPRouteStatusPtrOutputWithContext(ctx)
}

// UDPRouteStatusPtrInput is an input type that accepts UDPRouteStatusArgs, UDPRouteStatusPtr and UDPRouteStatusPtrOutput values.
// You can construct a concrete instance of `UDPRouteStatusPtrInput` via:
//
//	        UDPRouteStatusArgs{...}
//
//	or:
//
//	        nil
type UDPRouteStatusPtrInput interface {
	pulumi.Input

	ToUDPRouteStatusPtrOutput() UDPRouteStatusPtrOutput
	ToUDPRouteStatusPtrOutputWithContext(context.Context) UDPRouteStatusPtrOutput
}

type udprouteStatusPtrType UDPRouteStatusArgs

func UDPRouteStatusPtr(v *UDPRouteStatusArgs) UDPRouteStatusPtrInput {
	return (*udprouteStatusPtrType)(v)
}

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

func (i *udprouteStatusPtrType) ToUDPRouteStatusPtrOutput() UDPRouteStatusPtrOutput {
	return i.ToUDPRouteStatusPtrOutputWithContext(context.Background())
}

func (i *udprouteStatusPtrType) ToUDPRouteStatusPtrOutputWithContext(ctx context.Context) UDPRouteStatusPtrOutput {
	return pulumi.ToOutputWithContext(ctx, i).(UDPRouteStatusPtrOutput)
}

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

// Status defines the current state of UDPRoute.
type UDPRouteStatusOutput struct{ *pulumi.OutputState }

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

func (o UDPRouteStatusOutput) ToUDPRouteStatusOutput() UDPRouteStatusOutput {
	return o
}

func (o UDPRouteStatusOutput) ToUDPRouteStatusOutputWithContext(ctx context.Context) UDPRouteStatusOutput {
	return o
}

func (o UDPRouteStatusOutput) ToUDPRouteStatusPtrOutput() UDPRouteStatusPtrOutput {
	return o.ToUDPRouteStatusPtrOutputWithContext(context.Background())
}

func (o UDPRouteStatusOutput) ToUDPRouteStatusPtrOutputWithContext(ctx context.Context) UDPRouteStatusPtrOutput {
	return o.ApplyTWithContext(ctx, func(_ context.Context, v UDPRouteStatus) *UDPRouteStatus {
		return &v
	}).(UDPRouteStatusPtrOutput)
}

func (o UDPRouteStatusOutput) ToOutput(ctx context.Context) pulumix.Output[UDPRouteStatus] {
	return pulumix.Output[UDPRouteStatus]{
		OutputState: o.OutputState,
	}
}

// Parents is a list of parent resources (usually Gateways) that are associated with the route, and the status of the route with respect to each parent. When this route attaches to a parent, the controller that manages the parent must add an entry to this list when the controller first sees the route and should update the entry as appropriate when the route or gateway is modified.
//
//	Note that parent references that cannot be resolved by an implementation of this API will not be added to this list. Implementations of this API can only populate Route status for the Gateways/parent resources they are responsible for.
//	A maximum of 32 Gateways will be represented in this list. An empty list means the route has not been attached to any Gateway.
func (o UDPRouteStatusOutput) Parents() UDPRouteStatusParentsArrayOutput {
	return o.ApplyT(func(v UDPRouteStatus) []UDPRouteStatusParents { return v.Parents }).(UDPRouteStatusParentsArrayOutput)
}

type UDPRouteStatusPtrOutput struct{ *pulumi.OutputState }

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

func (o UDPRouteStatusPtrOutput) ToUDPRouteStatusPtrOutput() UDPRouteStatusPtrOutput {
	return o
}

func (o UDPRouteStatusPtrOutput) ToUDPRouteStatusPtrOutputWithContext(ctx context.Context) UDPRouteStatusPtrOutput {
	return o
}

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

func (o UDPRouteStatusPtrOutput) Elem() UDPRouteStatusOutput {
	return o.ApplyT(func(v *UDPRouteStatus) UDPRouteStatus {
		if v != nil {
			return *v
		}
		var ret UDPRouteStatus
		return ret
	}).(UDPRouteStatusOutput)
}

// Parents is a list of parent resources (usually Gateways) that are associated with the route, and the status of the route with respect to each parent. When this route attaches to a parent, the controller that manages the parent must add an entry to this list when the controller first sees the route and should update the entry as appropriate when the route or gateway is modified.
//
//	Note that parent references that cannot be resolved by an implementation of this API will not be added to this list. Implementations of this API can only populate Route status for the Gateways/parent resources they are responsible for.
//	A maximum of 32 Gateways will be represented in this list. An empty list means the route has not been attached to any Gateway.
func (o UDPRouteStatusPtrOutput) Parents() UDPRouteStatusParentsArrayOutput {
	return o.ApplyT(func(v *UDPRouteStatus) []UDPRouteStatusParents {
		if v == nil {
			return nil
		}
		return v.Parents
	}).(UDPRouteStatusParentsArrayOutput)
}

// RouteParentStatus describes the status of a route with respect to an associated Parent.
type UDPRouteStatusParents struct {
	// Conditions describes the status of the route with respect to the Gateway. Note that the route's availability is also subject to the Gateway's own status conditions and listener status.
	//  If the Route's ParentRef specifies an existing Gateway that supports Routes of this kind AND that Gateway's controller has sufficient access, then that Gateway's controller MUST set the "Accepted" condition on the Route, to indicate whether the route has been accepted or rejected by the Gateway, and why.
	//  A Route MUST be considered "Accepted" if at least one of the Route's rules is implemented by the Gateway.
	//  There are a number of cases where the "Accepted" condition may not be set due to lack of controller visibility, that includes when:
	//  * The Route refers to a non-existent parent. * The Route is of a type that the controller does not support. * The Route is in a namespace the controller does not have access to.
	Conditions []UDPRouteStatusParentsConditions `pulumi:"conditions"`
	// ControllerName is a domain/path string that indicates the name of the controller that wrote this status. This corresponds with the controllerName field on GatewayClass.
	//  Example: "example.net/gateway-controller".
	//  The format of this field is DOMAIN "/" PATH, where DOMAIN and PATH are valid Kubernetes names (https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
	//  Controllers MUST populate this field when writing status. Controllers should ensure that entries to status populated with their ControllerName are cleaned up when they are no longer necessary.
	ControllerName string `pulumi:"controllerName"`
	// ParentRef corresponds with a ParentRef in the spec that this RouteParentStatus struct describes the status of.
	ParentRef UDPRouteStatusParentsParentRef `pulumi:"parentRef"`
}

// Defaults sets the appropriate defaults for UDPRouteStatusParents
func (val *UDPRouteStatusParents) Defaults() *UDPRouteStatusParents {
	if val == nil {
		return nil
	}
	tmp := *val
	tmp.ParentRef = *tmp.ParentRef.Defaults()

	return &tmp
}

// UDPRouteStatusParentsInput is an input type that accepts UDPRouteStatusParentsArgs and UDPRouteStatusParentsOutput values.
// You can construct a concrete instance of `UDPRouteStatusParentsInput` via:
//
//	UDPRouteStatusParentsArgs{...}
type UDPRouteStatusParentsInput interface {
	pulumi.Input

	ToUDPRouteStatusParentsOutput() UDPRouteStatusParentsOutput
	ToUDPRouteStatusParentsOutputWithContext(context.Context) UDPRouteStatusParentsOutput
}

// RouteParentStatus describes the status of a route with respect to an associated Parent.
type UDPRouteStatusParentsArgs struct {
	// Conditions describes the status of the route with respect to the Gateway. Note that the route's availability is also subject to the Gateway's own status conditions and listener status.
	//  If the Route's ParentRef specifies an existing Gateway that supports Routes of this kind AND that Gateway's controller has sufficient access, then that Gateway's controller MUST set the "Accepted" condition on the Route, to indicate whether the route has been accepted or rejected by the Gateway, and why.
	//  A Route MUST be considered "Accepted" if at least one of the Route's rules is implemented by the Gateway.
	//  There are a number of cases where the "Accepted" condition may not be set due to lack of controller visibility, that includes when:
	//  * The Route refers to a non-existent parent. * The Route is of a type that the controller does not support. * The Route is in a namespace the controller does not have access to.
	Conditions UDPRouteStatusParentsConditionsArrayInput `pulumi:"conditions"`
	// ControllerName is a domain/path string that indicates the name of the controller that wrote this status. This corresponds with the controllerName field on GatewayClass.
	//  Example: "example.net/gateway-controller".
	//  The format of this field is DOMAIN "/" PATH, where DOMAIN and PATH are valid Kubernetes names (https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
	//  Controllers MUST populate this field when writing status. Controllers should ensure that entries to status populated with their ControllerName are cleaned up when they are no longer necessary.
	ControllerName pulumi.StringInput `pulumi:"controllerName"`
	// ParentRef corresponds with a ParentRef in the spec that this RouteParentStatus struct describes the status of.
	ParentRef UDPRouteStatusParentsParentRefInput `pulumi:"parentRef"`
}

// Defaults sets the appropriate defaults for UDPRouteStatusParentsArgs
func (val *UDPRouteStatusParentsArgs) Defaults() *UDPRouteStatusParentsArgs {
	if val == nil {
		return nil
	}
	tmp := *val

	return &tmp
}
func (UDPRouteStatusParentsArgs) ElementType() reflect.Type {
	return reflect.TypeOf((*UDPRouteStatusParents)(nil)).Elem()
}

func (i UDPRouteStatusParentsArgs) ToUDPRouteStatusParentsOutput() UDPRouteStatusParentsOutput {
	return i.ToUDPRouteStatusParentsOutputWithContext(context.Background())
}

func (i UDPRouteStatusParentsArgs) ToUDPRouteStatusParentsOutputWithContext(ctx context.Context) UDPRouteStatusParentsOutput {
	return pulumi.ToOutputWithContext(ctx, i).(UDPRouteStatusParentsOutput)
}

func (i UDPRouteStatusParentsArgs) ToOutput(ctx context.Context) pulumix.Output[UDPRouteStatusParents] {
	return pulumix.Output[UDPRouteStatusParents]{
		OutputState: i.ToUDPRouteStatusParentsOutputWithContext(ctx).OutputState,
	}
}

// UDPRouteStatusParentsArrayInput is an input type that accepts UDPRouteStatusParentsArray and UDPRouteStatusParentsArrayOutput values.
// You can construct a concrete instance of `UDPRouteStatusParentsArrayInput` via:
//
//	UDPRouteStatusParentsArray{ UDPRouteStatusParentsArgs{...} }
type UDPRouteStatusParentsArrayInput interface {
	pulumi.Input

	ToUDPRouteStatusParentsArrayOutput() UDPRouteStatusParentsArrayOutput
	ToUDPRouteStatusParentsArrayOutputWithContext(context.Context) UDPRouteStatusParentsArrayOutput
}

type UDPRouteStatusParentsArray []UDPRouteStatusParentsInput

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

func (i UDPRouteStatusParentsArray) ToUDPRouteStatusParentsArrayOutput() UDPRouteStatusParentsArrayOutput {
	return i.ToUDPRouteStatusParentsArrayOutputWithContext(context.Background())
}

func (i UDPRouteStatusParentsArray) ToUDPRouteStatusParentsArrayOutputWithContext(ctx context.Context) UDPRouteStatusParentsArrayOutput {
	return pulumi.ToOutputWithContext(ctx, i).(UDPRouteStatusParentsArrayOutput)
}

func (i UDPRouteStatusParentsArray) ToOutput(ctx context.Context) pulumix.Output[[]UDPRouteStatusParents] {
	return pulumix.Output[[]UDPRouteStatusParents]{
		OutputState: i.ToUDPRouteStatusParentsArrayOutputWithContext(ctx).OutputState,
	}
}

// RouteParentStatus describes the status of a route with respect to an associated Parent.
type UDPRouteStatusParentsOutput struct{ *pulumi.OutputState }

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

func (o UDPRouteStatusParentsOutput) ToUDPRouteStatusParentsOutput() UDPRouteStatusParentsOutput {
	return o
}

func (o UDPRouteStatusParentsOutput) ToUDPRouteStatusParentsOutputWithContext(ctx context.Context) UDPRouteStatusParentsOutput {
	return o
}

func (o UDPRouteStatusParentsOutput) ToOutput(ctx context.Context) pulumix.Output[UDPRouteStatusParents] {
	return pulumix.Output[UDPRouteStatusParents]{
		OutputState: o.OutputState,
	}
}

// Conditions describes the status of the route with respect to the Gateway. Note that the route's availability is also subject to the Gateway's own status conditions and listener status.
//
//	If the Route's ParentRef specifies an existing Gateway that supports Routes of this kind AND that Gateway's controller has sufficient access, then that Gateway's controller MUST set the "Accepted" condition on the Route, to indicate whether the route has been accepted or rejected by the Gateway, and why.
//	A Route MUST be considered "Accepted" if at least one of the Route's rules is implemented by the Gateway.
//	There are a number of cases where the "Accepted" condition may not be set due to lack of controller visibility, that includes when:
//	* The Route refers to a non-existent parent. * The Route is of a type that the controller does not support. * The Route is in a namespace the controller does not have access to.
func (o UDPRouteStatusParentsOutput) Conditions() UDPRouteStatusParentsConditionsArrayOutput {
	return o.ApplyT(func(v UDPRouteStatusParents) []UDPRouteStatusParentsConditions { return v.Conditions }).(UDPRouteStatusParentsConditionsArrayOutput)
}

// ControllerName is a domain/path string that indicates the name of the controller that wrote this status. This corresponds with the controllerName field on GatewayClass.
//
//	Example: "example.net/gateway-controller".
//	The format of this field is DOMAIN "/" PATH, where DOMAIN and PATH are valid Kubernetes names (https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
//	Controllers MUST populate this field when writing status. Controllers should ensure that entries to status populated with their ControllerName are cleaned up when they are no longer necessary.
func (o UDPRouteStatusParentsOutput) ControllerName() pulumi.StringOutput {
	return o.ApplyT(func(v UDPRouteStatusParents) string { return v.ControllerName }).(pulumi.StringOutput)
}

// ParentRef corresponds with a ParentRef in the spec that this RouteParentStatus struct describes the status of.
func (o UDPRouteStatusParentsOutput) ParentRef() UDPRouteStatusParentsParentRefOutput {
	return o.ApplyT(func(v UDPRouteStatusParents) UDPRouteStatusParentsParentRef { return v.ParentRef }).(UDPRouteStatusParentsParentRefOutput)
}

type UDPRouteStatusParentsArrayOutput struct{ *pulumi.OutputState }

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

func (o UDPRouteStatusParentsArrayOutput) ToUDPRouteStatusParentsArrayOutput() UDPRouteStatusParentsArrayOutput {
	return o
}

func (o UDPRouteStatusParentsArrayOutput) ToUDPRouteStatusParentsArrayOutputWithContext(ctx context.Context) UDPRouteStatusParentsArrayOutput {
	return o
}

func (o UDPRouteStatusParentsArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]UDPRouteStatusParents] {
	return pulumix.Output[[]UDPRouteStatusParents]{
		OutputState: o.OutputState,
	}
}

func (o UDPRouteStatusParentsArrayOutput) Index(i pulumi.IntInput) UDPRouteStatusParentsOutput {
	return pulumi.All(o, i).ApplyT(func(vs []interface{}) UDPRouteStatusParents {
		return vs[0].([]UDPRouteStatusParents)[vs[1].(int)]
	}).(UDPRouteStatusParentsOutput)
}

// Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions.  For example,
//
//	type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: "Available", "Progressing", and "Degraded" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
//	// other fields }
type UDPRouteStatusParentsConditions struct {
	// lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed.  If that is not known, then using the time when the API field changed is acceptable.
	LastTransitionTime string `pulumi:"lastTransitionTime"`
	// message is a human readable message indicating details about the transition. This may be an empty string.
	Message string `pulumi:"message"`
	// observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.
	ObservedGeneration *int `pulumi:"observedGeneration"`
	// reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.
	Reason string `pulumi:"reason"`
	// status of the condition, one of True, False, Unknown.
	Status string `pulumi:"status"`
	// type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
	Type string `pulumi:"type"`
}

// UDPRouteStatusParentsConditionsInput is an input type that accepts UDPRouteStatusParentsConditionsArgs and UDPRouteStatusParentsConditionsOutput values.
// You can construct a concrete instance of `UDPRouteStatusParentsConditionsInput` via:
//
//	UDPRouteStatusParentsConditionsArgs{...}
type UDPRouteStatusParentsConditionsInput interface {
	pulumi.Input

	ToUDPRouteStatusParentsConditionsOutput() UDPRouteStatusParentsConditionsOutput
	ToUDPRouteStatusParentsConditionsOutputWithContext(context.Context) UDPRouteStatusParentsConditionsOutput
}

// Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions.  For example,
//
//	type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: "Available", "Progressing", and "Degraded" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
//	// other fields }
type UDPRouteStatusParentsConditionsArgs struct {
	// lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed.  If that is not known, then using the time when the API field changed is acceptable.
	LastTransitionTime pulumi.StringInput `pulumi:"lastTransitionTime"`
	// message is a human readable message indicating details about the transition. This may be an empty string.
	Message pulumi.StringInput `pulumi:"message"`
	// observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.
	ObservedGeneration pulumi.IntPtrInput `pulumi:"observedGeneration"`
	// reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.
	Reason pulumi.StringInput `pulumi:"reason"`
	// status of the condition, one of True, False, Unknown.
	Status pulumi.StringInput `pulumi:"status"`
	// type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
	Type pulumi.StringInput `pulumi:"type"`
}

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

func (i UDPRouteStatusParentsConditionsArgs) ToUDPRouteStatusParentsConditionsOutput() UDPRouteStatusParentsConditionsOutput {
	return i.ToUDPRouteStatusParentsConditionsOutputWithContext(context.Background())
}

func (i UDPRouteStatusParentsConditionsArgs) ToUDPRouteStatusParentsConditionsOutputWithContext(ctx context.Context) UDPRouteStatusParentsConditionsOutput {
	return pulumi.ToOutputWithContext(ctx, i).(UDPRouteStatusParentsConditionsOutput)
}

func (i UDPRouteStatusParentsConditionsArgs) ToOutput(ctx context.Context) pulumix.Output[UDPRouteStatusParentsConditions] {
	return pulumix.Output[UDPRouteStatusParentsConditions]{
		OutputState: i.ToUDPRouteStatusParentsConditionsOutputWithContext(ctx).OutputState,
	}
}

// UDPRouteStatusParentsConditionsArrayInput is an input type that accepts UDPRouteStatusParentsConditionsArray and UDPRouteStatusParentsConditionsArrayOutput values.
// You can construct a concrete instance of `UDPRouteStatusParentsConditionsArrayInput` via:
//
//	UDPRouteStatusParentsConditionsArray{ UDPRouteStatusParentsConditionsArgs{...} }
type UDPRouteStatusParentsConditionsArrayInput interface {
	pulumi.Input

	ToUDPRouteStatusParentsConditionsArrayOutput() UDPRouteStatusParentsConditionsArrayOutput
	ToUDPRouteStatusParentsConditionsArrayOutputWithContext(context.Context) UDPRouteStatusParentsConditionsArrayOutput
}

type UDPRouteStatusParentsConditionsArray []UDPRouteStatusParentsConditionsInput

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

func (i UDPRouteStatusParentsConditionsArray) ToUDPRouteStatusParentsConditionsArrayOutput() UDPRouteStatusParentsConditionsArrayOutput {
	return i.ToUDPRouteStatusParentsConditionsArrayOutputWithContext(context.Background())
}

func (i UDPRouteStatusParentsConditionsArray) ToUDPRouteStatusParentsConditionsArrayOutputWithContext(ctx context.Context) UDPRouteStatusParentsConditionsArrayOutput {
	return pulumi.ToOutputWithContext(ctx, i).(UDPRouteStatusParentsConditionsArrayOutput)
}

func (i UDPRouteStatusParentsConditionsArray) ToOutput(ctx context.Context) pulumix.Output[[]UDPRouteStatusParentsConditions] {
	return pulumix.Output[[]UDPRouteStatusParentsConditions]{
		OutputState: i.ToUDPRouteStatusParentsConditionsArrayOutputWithContext(ctx).OutputState,
	}
}

// Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions.  For example,
//
//	type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: "Available", "Progressing", and "Degraded" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
//	// other fields }
type UDPRouteStatusParentsConditionsOutput struct{ *pulumi.OutputState }

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

func (o UDPRouteStatusParentsConditionsOutput) ToUDPRouteStatusParentsConditionsOutput() UDPRouteStatusParentsConditionsOutput {
	return o
}

func (o UDPRouteStatusParentsConditionsOutput) ToUDPRouteStatusParentsConditionsOutputWithContext(ctx context.Context) UDPRouteStatusParentsConditionsOutput {
	return o
}

func (o UDPRouteStatusParentsConditionsOutput) ToOutput(ctx context.Context) pulumix.Output[UDPRouteStatusParentsConditions] {
	return pulumix.Output[UDPRouteStatusParentsConditions]{
		OutputState: o.OutputState,
	}
}

// lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed.  If that is not known, then using the time when the API field changed is acceptable.
func (o UDPRouteStatusParentsConditionsOutput) LastTransitionTime() pulumi.StringOutput {
	return o.ApplyT(func(v UDPRouteStatusParentsConditions) string { return v.LastTransitionTime }).(pulumi.StringOutput)
}

// message is a human readable message indicating details about the transition. This may be an empty string.
func (o UDPRouteStatusParentsConditionsOutput) Message() pulumi.StringOutput {
	return o.ApplyT(func(v UDPRouteStatusParentsConditions) string { return v.Message }).(pulumi.StringOutput)
}

// observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.
func (o UDPRouteStatusParentsConditionsOutput) ObservedGeneration() pulumi.IntPtrOutput {
	return o.ApplyT(func(v UDPRouteStatusParentsConditions) *int { return v.ObservedGeneration }).(pulumi.IntPtrOutput)
}

// reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.
func (o UDPRouteStatusParentsConditionsOutput) Reason() pulumi.StringOutput {
	return o.ApplyT(func(v UDPRouteStatusParentsConditions) string { return v.Reason }).(pulumi.StringOutput)
}

// status of the condition, one of True, False, Unknown.
func (o UDPRouteStatusParentsConditionsOutput) Status() pulumi.StringOutput {
	return o.ApplyT(func(v UDPRouteStatusParentsConditions) string { return v.Status }).(pulumi.StringOutput)
}

// type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
func (o UDPRouteStatusParentsConditionsOutput) Type() pulumi.StringOutput {
	return o.ApplyT(func(v UDPRouteStatusParentsConditions) string { return v.Type }).(pulumi.StringOutput)
}

type UDPRouteStatusParentsConditionsArrayOutput struct{ *pulumi.OutputState }

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

func (o UDPRouteStatusParentsConditionsArrayOutput) ToUDPRouteStatusParentsConditionsArrayOutput() UDPRouteStatusParentsConditionsArrayOutput {
	return o
}

func (o UDPRouteStatusParentsConditionsArrayOutput) ToUDPRouteStatusParentsConditionsArrayOutputWithContext(ctx context.Context) UDPRouteStatusParentsConditionsArrayOutput {
	return o
}

func (o UDPRouteStatusParentsConditionsArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]UDPRouteStatusParentsConditions] {
	return pulumix.Output[[]UDPRouteStatusParentsConditions]{
		OutputState: o.OutputState,
	}
}

func (o UDPRouteStatusParentsConditionsArrayOutput) Index(i pulumi.IntInput) UDPRouteStatusParentsConditionsOutput {
	return pulumi.All(o, i).ApplyT(func(vs []interface{}) UDPRouteStatusParentsConditions {
		return vs[0].([]UDPRouteStatusParentsConditions)[vs[1].(int)]
	}).(UDPRouteStatusParentsConditionsOutput)
}

// ParentRef corresponds with a ParentRef in the spec that this RouteParentStatus struct describes the status of.
type UDPRouteStatusParentsParentRef struct {
	// Group is the group of the referent. When unspecified, "gateway.networking.k8s.io" is inferred. To set the core API group (such as for a "Service" kind referent), Group must be explicitly set to "" (empty string).
	//  Support: Core
	Group *string `pulumi:"group"`
	// Kind is kind of the referent.
	//  There are two kinds of parent resources with "Core" support:
	//  * Gateway (Gateway conformance profile) * Service (Mesh conformance profile, experimental, ClusterIP Services only)
	//     Support for other resources is Implementation-Specific.
	Kind *string `pulumi:"kind"`
	// Name is the name of the referent.
	//  Support: Core
	Name string `pulumi:"name"`
	// Namespace is the namespace of the referent. When unspecified, this refers to the local namespace of the Route.
	//  Note that there are specific rules for ParentRefs which cross namespace boundaries. Cross-namespace references are only valid if they are explicitly allowed by something in the namespace they are referring to. For example: Gateway has the AllowedRoutes field, and ReferenceGrant provides a generic way to enable any other kind of cross-namespace reference.
	//   ParentRefs from a Route to a Service in the same namespace are "producer" routes, which apply default routing rules to inbound connections from any namespace to the Service.
	//  ParentRefs from a Route to a Service in a different namespace are "consumer" routes, and these routing rules are only applied to outbound connections originating from the same namespace as the Route, for which the intended destination of the connections are a Service targeted as a ParentRef of the Route.\
	//  Support: Core
	Namespace *string `pulumi:"namespace"`
	// Port is the network port this Route targets. It can be interpreted differently based on the type of parent resource.
	//  When the parent resource is a Gateway, this targets all listeners listening on the specified port that also support this kind of Route(and select this Route). It's not recommended to set `Port` unless the networking behaviors specified in a Route must apply to a specific port as opposed to a listener(s) whose port(s) may be changed. When both Port and SectionName are specified, the name and port of the selected listener must match both specified values.
	//   When the parent resource is a Service, this targets a specific port in the Service spec. When both Port (experimental) and SectionName are specified, the name and port of the selected port must match both specified values.\
	//  Implementations MAY choose to support other parent resources. Implementations supporting other types of parent resources MUST clearly document how/if Port is interpreted.
	//  For the purpose of status, an attachment is considered successful as long as the parent resource accepts it partially. For example, Gateway listeners can restrict which Routes can attach to them by Route kind, namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from the referencing Route, the Route MUST be considered successfully attached. If no Gateway listeners accept attachment from this Route, the Route MUST be considered detached from the Gateway.
	//  Support: Extended
	Port *int `pulumi:"port"`
	// SectionName is the name of a section within the target resource. In the following resources, SectionName is interpreted as the following:
	//  * Gateway: Listener Name. When both Port (experimental) and SectionName are specified, the name and port of the selected listener must match both specified values. * Service: Port Name. When both Port (experimental) and SectionName are specified, the name and port of the selected listener must match both specified values. Note that attaching Routes to Services as Parents is part of experimental Mesh support and is not supported for any other purpose.
	//     Implementations MAY choose to support attaching Routes to other resources. If that is the case, they MUST clearly document how SectionName is interpreted.
	//     When unspecified (empty string), this will reference the entire resource. For the purpose of status, an attachment is considered successful if at least one section in the parent resource accepts it. For example, Gateway listeners can restrict which Routes can attach to them by Route kind, namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from the referencing Route, the Route MUST be considered successfully attached. If no Gateway listeners accept attachment from this Route, the Route MUST be considered detached from the Gateway.
	//     Support: Core
	SectionName *string `pulumi:"sectionName"`
}

// Defaults sets the appropriate defaults for UDPRouteStatusParentsParentRef
func (val *UDPRouteStatusParentsParentRef) Defaults() *UDPRouteStatusParentsParentRef {
	if val == nil {
		return nil
	}
	tmp := *val
	if tmp.Group == nil {
		group_ := "gateway.networking.k8s.io"
		tmp.Group = &group_
	}
	if tmp.Kind == nil {
		kind_ := "Gateway"
		tmp.Kind = &kind_
	}
	return &tmp
}

// UDPRouteStatusParentsParentRefInput is an input type that accepts UDPRouteStatusParentsParentRefArgs and UDPRouteStatusParentsParentRefOutput values.
// You can construct a concrete instance of `UDPRouteStatusParentsParentRefInput` via:
//
//	UDPRouteStatusParentsParentRefArgs{...}
type UDPRouteStatusParentsParentRefInput interface {
	pulumi.Input

	ToUDPRouteStatusParentsParentRefOutput() UDPRouteStatusParentsParentRefOutput
	ToUDPRouteStatusParentsParentRefOutputWithContext(context.Context) UDPRouteStatusParentsParentRefOutput
}

// ParentRef corresponds with a ParentRef in the spec that this RouteParentStatus struct describes the status of.
type UDPRouteStatusParentsParentRefArgs struct {
	// Group is the group of the referent. When unspecified, "gateway.networking.k8s.io" is inferred. To set the core API group (such as for a "Service" kind referent), Group must be explicitly set to "" (empty string).
	//  Support: Core
	Group pulumi.StringPtrInput `pulumi:"group"`
	// Kind is kind of the referent.
	//  There are two kinds of parent resources with "Core" support:
	//  * Gateway (Gateway conformance profile) * Service (Mesh conformance profile, experimental, ClusterIP Services only)
	//     Support for other resources is Implementation-Specific.
	Kind pulumi.StringPtrInput `pulumi:"kind"`
	// Name is the name of the referent.
	//  Support: Core
	Name pulumi.StringInput `pulumi:"name"`
	// Namespace is the namespace of the referent. When unspecified, this refers to the local namespace of the Route.
	//  Note that there are specific rules for ParentRefs which cross namespace boundaries. Cross-namespace references are only valid if they are explicitly allowed by something in the namespace they are referring to. For example: Gateway has the AllowedRoutes field, and ReferenceGrant provides a generic way to enable any other kind of cross-namespace reference.
	//   ParentRefs from a Route to a Service in the same namespace are "producer" routes, which apply default routing rules to inbound connections from any namespace to the Service.
	//  ParentRefs from a Route to a Service in a different namespace are "consumer" routes, and these routing rules are only applied to outbound connections originating from the same namespace as the Route, for which the intended destination of the connections are a Service targeted as a ParentRef of the Route.\
	//  Support: Core
	Namespace pulumi.StringPtrInput `pulumi:"namespace"`
	// Port is the network port this Route targets. It can be interpreted differently based on the type of parent resource.
	//  When the parent resource is a Gateway, this targets all listeners listening on the specified port that also support this kind of Route(and select this Route). It's not recommended to set `Port` unless the networking behaviors specified in a Route must apply to a specific port as opposed to a listener(s) whose port(s) may be changed. When both Port and SectionName are specified, the name and port of the selected listener must match both specified values.
	//   When the parent resource is a Service, this targets a specific port in the Service spec. When both Port (experimental) and SectionName are specified, the name and port of the selected port must match both specified values.\
	//  Implementations MAY choose to support other parent resources. Implementations supporting other types of parent resources MUST clearly document how/if Port is interpreted.
	//  For the purpose of status, an attachment is considered successful as long as the parent resource accepts it partially. For example, Gateway listeners can restrict which Routes can attach to them by Route kind, namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from the referencing Route, the Route MUST be considered successfully attached. If no Gateway listeners accept attachment from this Route, the Route MUST be considered detached from the Gateway.
	//  Support: Extended
	Port pulumi.IntPtrInput `pulumi:"port"`
	// SectionName is the name of a section within the target resource. In the following resources, SectionName is interpreted as the following:
	//  * Gateway: Listener Name. When both Port (experimental) and SectionName are specified, the name and port of the selected listener must match both specified values. * Service: Port Name. When both Port (experimental) and SectionName are specified, the name and port of the selected listener must match both specified values. Note that attaching Routes to Services as Parents is part of experimental Mesh support and is not supported for any other purpose.
	//     Implementations MAY choose to support attaching Routes to other resources. If that is the case, they MUST clearly document how SectionName is interpreted.
	//     When unspecified (empty string), this will reference the entire resource. For the purpose of status, an attachment is considered successful if at least one section in the parent resource accepts it. For example, Gateway listeners can restrict which Routes can attach to them by Route kind, namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from the referencing Route, the Route MUST be considered successfully attached. If no Gateway listeners accept attachment from this Route, the Route MUST be considered detached from the Gateway.
	//     Support: Core
	SectionName pulumi.StringPtrInput `pulumi:"sectionName"`
}

// Defaults sets the appropriate defaults for UDPRouteStatusParentsParentRefArgs
func (val *UDPRouteStatusParentsParentRefArgs) Defaults() *UDPRouteStatusParentsParentRefArgs {
	if val == nil {
		return nil
	}
	tmp := *val
	if tmp.Group == nil {
		tmp.Group = pulumi.StringPtr("gateway.networking.k8s.io")
	}
	if tmp.Kind == nil {
		tmp.Kind = pulumi.StringPtr("Gateway")
	}
	return &tmp
}
func (UDPRouteStatusParentsParentRefArgs) ElementType() reflect.Type {
	return reflect.TypeOf((*UDPRouteStatusParentsParentRef)(nil)).Elem()
}

func (i UDPRouteStatusParentsParentRefArgs) ToUDPRouteStatusParentsParentRefOutput() UDPRouteStatusParentsParentRefOutput {
	return i.ToUDPRouteStatusParentsParentRefOutputWithContext(context.Background())
}

func (i UDPRouteStatusParentsParentRefArgs) ToUDPRouteStatusParentsParentRefOutputWithContext(ctx context.Context) UDPRouteStatusParentsParentRefOutput {
	return pulumi.ToOutputWithContext(ctx, i).(UDPRouteStatusParentsParentRefOutput)
}

func (i UDPRouteStatusParentsParentRefArgs) ToOutput(ctx context.Context) pulumix.Output[UDPRouteStatusParentsParentRef] {
	return pulumix.Output[UDPRouteStatusParentsParentRef]{
		OutputState: i.ToUDPRouteStatusParentsParentRefOutputWithContext(ctx).OutputState,
	}
}

// ParentRef corresponds with a ParentRef in the spec that this RouteParentStatus struct describes the status of.
type UDPRouteStatusParentsParentRefOutput struct{ *pulumi.OutputState }

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

func (o UDPRouteStatusParentsParentRefOutput) ToUDPRouteStatusParentsParentRefOutput() UDPRouteStatusParentsParentRefOutput {
	return o
}

func (o UDPRouteStatusParentsParentRefOutput) ToUDPRouteStatusParentsParentRefOutputWithContext(ctx context.Context) UDPRouteStatusParentsParentRefOutput {
	return o
}

func (o UDPRouteStatusParentsParentRefOutput) ToOutput(ctx context.Context) pulumix.Output[UDPRouteStatusParentsParentRef] {
	return pulumix.Output[UDPRouteStatusParentsParentRef]{
		OutputState: o.OutputState,
	}
}

// Group is the group of the referent. When unspecified, "gateway.networking.k8s.io" is inferred. To set the core API group (such as for a "Service" kind referent), Group must be explicitly set to "" (empty string).
//
//	Support: Core
func (o UDPRouteStatusParentsParentRefOutput) Group() pulumi.StringPtrOutput {
	return o.ApplyT(func(v UDPRouteStatusParentsParentRef) *string { return v.Group }).(pulumi.StringPtrOutput)
}

// Kind is kind of the referent.
//
//	There are two kinds of parent resources with "Core" support:
//	* Gateway (Gateway conformance profile) * Service (Mesh conformance profile, experimental, ClusterIP Services only)
//	   Support for other resources is Implementation-Specific.
func (o UDPRouteStatusParentsParentRefOutput) Kind() pulumi.StringPtrOutput {
	return o.ApplyT(func(v UDPRouteStatusParentsParentRef) *string { return v.Kind }).(pulumi.StringPtrOutput)
}

// Name is the name of the referent.
//
//	Support: Core
func (o UDPRouteStatusParentsParentRefOutput) Name() pulumi.StringOutput {
	return o.ApplyT(func(v UDPRouteStatusParentsParentRef) string { return v.Name }).(pulumi.StringOutput)
}

// Namespace is the namespace of the referent. When unspecified, this refers to the local namespace of the Route.
//
//	Note that there are specific rules for ParentRefs which cross namespace boundaries. Cross-namespace references are only valid if they are explicitly allowed by something in the namespace they are referring to. For example: Gateway has the AllowedRoutes field, and ReferenceGrant provides a generic way to enable any other kind of cross-namespace reference.
//	 ParentRefs from a Route to a Service in the same namespace are "producer" routes, which apply default routing rules to inbound connections from any namespace to the Service.
//	ParentRefs from a Route to a Service in a different namespace are "consumer" routes, and these routing rules are only applied to outbound connections originating from the same namespace as the Route, for which the intended destination of the connections are a Service targeted as a ParentRef of the Route.\
//	Support: Core
func (o UDPRouteStatusParentsParentRefOutput) Namespace() pulumi.StringPtrOutput {
	return o.ApplyT(func(v UDPRouteStatusParentsParentRef) *string { return v.Namespace }).(pulumi.StringPtrOutput)
}

// Port is the network port this Route targets. It can be interpreted differently based on the type of parent resource.
//
//	When the parent resource is a Gateway, this targets all listeners listening on the specified port that also support this kind of Route(and select this Route). It's not recommended to set `Port` unless the networking behaviors specified in a Route must apply to a specific port as opposed to a listener(s) whose port(s) may be changed. When both Port and SectionName are specified, the name and port of the selected listener must match both specified values.
//	 When the parent resource is a Service, this targets a specific port in the Service spec. When both Port (experimental) and SectionName are specified, the name and port of the selected port must match both specified values.\
//	Implementations MAY choose to support other parent resources. Implementations supporting other types of parent resources MUST clearly document how/if Port is interpreted.
//	For the purpose of status, an attachment is considered successful as long as the parent resource accepts it partially. For example, Gateway listeners can restrict which Routes can attach to them by Route kind, namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from the referencing Route, the Route MUST be considered successfully attached. If no Gateway listeners accept attachment from this Route, the Route MUST be considered detached from the Gateway.
//	Support: Extended
func (o UDPRouteStatusParentsParentRefOutput) Port() pulumi.IntPtrOutput {
	return o.ApplyT(func(v UDPRouteStatusParentsParentRef) *int { return v.Port }).(pulumi.IntPtrOutput)
}

// SectionName is the name of a section within the target resource. In the following resources, SectionName is interpreted as the following:
//   - Gateway: Listener Name. When both Port (experimental) and SectionName are specified, the name and port of the selected listener must match both specified values. * Service: Port Name. When both Port (experimental) and SectionName are specified, the name and port of the selected listener must match both specified values. Note that attaching Routes to Services as Parents is part of experimental Mesh support and is not supported for any other purpose.
//     Implementations MAY choose to support attaching Routes to other resources. If that is the case, they MUST clearly document how SectionName is interpreted.
//     When unspecified (empty string), this will reference the entire resource. For the purpose of status, an attachment is considered successful if at least one section in the parent resource accepts it. For example, Gateway listeners can restrict which Routes can attach to them by Route kind, namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from the referencing Route, the Route MUST be considered successfully attached. If no Gateway listeners accept attachment from this Route, the Route MUST be considered detached from the Gateway.
//     Support: Core
func (o UDPRouteStatusParentsParentRefOutput) SectionName() pulumi.StringPtrOutput {
	return o.ApplyT(func(v UDPRouteStatusParentsParentRef) *string { return v.SectionName }).(pulumi.StringPtrOutput)
}

func init() {
	pulumi.RegisterInputType(reflect.TypeOf((*UDPRouteSpecInput)(nil)).Elem(), UDPRouteSpecArgs{})
	pulumi.RegisterInputType(reflect.TypeOf((*UDPRouteSpecPtrInput)(nil)).Elem(), UDPRouteSpecArgs{})
	pulumi.RegisterInputType(reflect.TypeOf((*UDPRouteSpecParentRefsInput)(nil)).Elem(), UDPRouteSpecParentRefsArgs{})
	pulumi.RegisterInputType(reflect.TypeOf((*UDPRouteSpecParentRefsArrayInput)(nil)).Elem(), UDPRouteSpecParentRefsArray{})
	pulumi.RegisterInputType(reflect.TypeOf((*UDPRouteSpecRulesInput)(nil)).Elem(), UDPRouteSpecRulesArgs{})
	pulumi.RegisterInputType(reflect.TypeOf((*UDPRouteSpecRulesArrayInput)(nil)).Elem(), UDPRouteSpecRulesArray{})
	pulumi.RegisterInputType(reflect.TypeOf((*UDPRouteSpecRulesBackendRefsInput)(nil)).Elem(), UDPRouteSpecRulesBackendRefsArgs{})
	pulumi.RegisterInputType(reflect.TypeOf((*UDPRouteSpecRulesBackendRefsArrayInput)(nil)).Elem(), UDPRouteSpecRulesBackendRefsArray{})
	pulumi.RegisterInputType(reflect.TypeOf((*UDPRouteStatusInput)(nil)).Elem(), UDPRouteStatusArgs{})
	pulumi.RegisterInputType(reflect.TypeOf((*UDPRouteStatusPtrInput)(nil)).Elem(), UDPRouteStatusArgs{})
	pulumi.RegisterInputType(reflect.TypeOf((*UDPRouteStatusParentsInput)(nil)).Elem(), UDPRouteStatusParentsArgs{})
	pulumi.RegisterInputType(reflect.TypeOf((*UDPRouteStatusParentsArrayInput)(nil)).Elem(), UDPRouteStatusParentsArray{})
	pulumi.RegisterInputType(reflect.TypeOf((*UDPRouteStatusParentsConditionsInput)(nil)).Elem(), UDPRouteStatusParentsConditionsArgs{})
	pulumi.RegisterInputType(reflect.TypeOf((*UDPRouteStatusParentsConditionsArrayInput)(nil)).Elem(), UDPRouteStatusParentsConditionsArray{})
	pulumi.RegisterInputType(reflect.TypeOf((*UDPRouteStatusParentsParentRefInput)(nil)).Elem(), UDPRouteStatusParentsParentRefArgs{})
	pulumi.RegisterOutputType(UDPRouteSpecOutput{})
	pulumi.RegisterOutputType(UDPRouteSpecPtrOutput{})
	pulumi.RegisterOutputType(UDPRouteSpecParentRefsOutput{})
	pulumi.RegisterOutputType(UDPRouteSpecParentRefsArrayOutput{})
	pulumi.RegisterOutputType(UDPRouteSpecRulesOutput{})
	pulumi.RegisterOutputType(UDPRouteSpecRulesArrayOutput{})
	pulumi.RegisterOutputType(UDPRouteSpecRulesBackendRefsOutput{})
	pulumi.RegisterOutputType(UDPRouteSpecRulesBackendRefsArrayOutput{})
	pulumi.RegisterOutputType(UDPRouteStatusOutput{})
	pulumi.RegisterOutputType(UDPRouteStatusPtrOutput{})
	pulumi.RegisterOutputType(UDPRouteStatusParentsOutput{})
	pulumi.RegisterOutputType(UDPRouteStatusParentsArrayOutput{})
	pulumi.RegisterOutputType(UDPRouteStatusParentsConditionsOutput{})
	pulumi.RegisterOutputType(UDPRouteStatusParentsConditionsArrayOutput{})
	pulumi.RegisterOutputType(UDPRouteStatusParentsParentRefOutput{})
}
