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

package v1alpha1

import (
	"context"
	"reflect"

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

// ServersTransportTCP is the CRD implementation of a TCPServersTransport.
// If no tcpServersTransport is specified, a default one named default@internal will be used.
// The default@internal tcpServersTransport can be configured in the static configuration.
// More info: https://doc.traefik.io/traefik/v3.0/routing/services/#serverstransport_3
type ServersTransportTCP struct {
	pulumi.CustomResourceState

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

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

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

// GetServersTransportTCP gets an existing ServersTransportTCP resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetServersTransportTCP(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *ServersTransportTCPState, opts ...pulumi.ResourceOption) (*ServersTransportTCP, error) {
	var resource ServersTransportTCP
	err := ctx.ReadResource("kubernetes:traefik.io/v1alpha1:ServersTransportTCP", name, id, state, &resource, opts...)
	if err != nil {
		return nil, err
	}
	return &resource, nil
}

// Input properties used for looking up and filtering ServersTransportTCP resources.
type serversTransportTCPState struct {
}

type ServersTransportTCPState struct {
}

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

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

// The set of arguments for constructing a ServersTransportTCP resource.
type ServersTransportTCPArgs struct {
	ApiVersion pulumi.StringPtrInput
	Kind       pulumi.StringPtrInput
	Metadata   v1.ObjectMetaPtrInput
	// ServersTransportTCPSpec defines the desired state of a ServersTransportTCP.
	Spec ServersTransportTCPSpecPtrInput
}

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

type ServersTransportTCPInput interface {
	pulumi.Input

	ToServersTransportTCPOutput() ServersTransportTCPOutput
	ToServersTransportTCPOutputWithContext(ctx context.Context) ServersTransportTCPOutput
}

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

func (i *ServersTransportTCP) ToServersTransportTCPOutput() ServersTransportTCPOutput {
	return i.ToServersTransportTCPOutputWithContext(context.Background())
}

func (i *ServersTransportTCP) ToServersTransportTCPOutputWithContext(ctx context.Context) ServersTransportTCPOutput {
	return pulumi.ToOutputWithContext(ctx, i).(ServersTransportTCPOutput)
}

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

type ServersTransportTCPOutput struct{ *pulumi.OutputState }

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

func (o ServersTransportTCPOutput) ToServersTransportTCPOutput() ServersTransportTCPOutput {
	return o
}

func (o ServersTransportTCPOutput) ToServersTransportTCPOutputWithContext(ctx context.Context) ServersTransportTCPOutput {
	return o
}

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

func (o ServersTransportTCPOutput) ApiVersion() pulumi.StringPtrOutput {
	return o.ApplyT(func(v *ServersTransportTCP) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput)
}

func (o ServersTransportTCPOutput) Kind() pulumi.StringPtrOutput {
	return o.ApplyT(func(v *ServersTransportTCP) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput)
}

func (o ServersTransportTCPOutput) Metadata() v1.ObjectMetaOutput {
	return o.ApplyT(func(v *ServersTransportTCP) v1.ObjectMetaOutput { return v.Metadata }).(v1.ObjectMetaOutput)
}

// ServersTransportTCPSpec defines the desired state of a ServersTransportTCP.
func (o ServersTransportTCPOutput) Spec() ServersTransportTCPSpecOutput {
	return o.ApplyT(func(v *ServersTransportTCP) ServersTransportTCPSpecOutput { return v.Spec }).(ServersTransportTCPSpecOutput)
}

func init() {
	pulumi.RegisterInputType(reflect.TypeOf((*ServersTransportTCPInput)(nil)).Elem(), &ServersTransportTCP{})
	pulumi.RegisterOutputType(ServersTransportTCPOutput{})
}
