pulumi-library/crds/kubernetes/traefik/v1alpha1/serversTransport.go

158 lines
5.6 KiB
Go

// 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"
)
// ServersTransport is the CRD implementation of a ServersTransport.
// If no serversTransport is specified, the default@internal will be used.
// The default@internal serversTransport is created from the static configuration.
// More info: https://doc.traefik.io/traefik/v2.11/routing/services/#serverstransport_1
type ServersTransport struct {
pulumi.CustomResourceState
ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"`
Kind pulumi.StringPtrOutput `pulumi:"kind"`
Metadata v1.ObjectMetaOutput `pulumi:"metadata"`
// ServersTransportSpec defines the desired state of a ServersTransport.
Spec ServersTransportSpecOutput `pulumi:"spec"`
}
// NewServersTransport registers a new resource with the given unique name, arguments, and options.
func NewServersTransport(ctx *pulumi.Context,
name string, args *ServersTransportArgs, opts ...pulumi.ResourceOption) (*ServersTransport, error) {
if args == nil {
args = &ServersTransportArgs{}
}
args.ApiVersion = pulumi.StringPtr("traefik.io/v1alpha1")
args.Kind = pulumi.StringPtr("ServersTransport")
opts = internal.PkgResourceDefaultOpts(opts)
var resource ServersTransport
err := ctx.RegisterResource("kubernetes:traefik.io/v1alpha1:ServersTransport", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetServersTransport gets an existing ServersTransport 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 GetServersTransport(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ServersTransportState, opts ...pulumi.ResourceOption) (*ServersTransport, error) {
var resource ServersTransport
err := ctx.ReadResource("kubernetes:traefik.io/v1alpha1:ServersTransport", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ServersTransport resources.
type serversTransportState struct {
}
type ServersTransportState struct {
}
func (ServersTransportState) ElementType() reflect.Type {
return reflect.TypeOf((*serversTransportState)(nil)).Elem()
}
type serversTransportArgs struct {
ApiVersion *string `pulumi:"apiVersion"`
Kind *string `pulumi:"kind"`
Metadata *v1.ObjectMeta `pulumi:"metadata"`
// ServersTransportSpec defines the desired state of a ServersTransport.
Spec *ServersTransportSpec `pulumi:"spec"`
}
// The set of arguments for constructing a ServersTransport resource.
type ServersTransportArgs struct {
ApiVersion pulumi.StringPtrInput
Kind pulumi.StringPtrInput
Metadata v1.ObjectMetaPtrInput
// ServersTransportSpec defines the desired state of a ServersTransport.
Spec ServersTransportSpecPtrInput
}
func (ServersTransportArgs) ElementType() reflect.Type {
return reflect.TypeOf((*serversTransportArgs)(nil)).Elem()
}
type ServersTransportInput interface {
pulumi.Input
ToServersTransportOutput() ServersTransportOutput
ToServersTransportOutputWithContext(ctx context.Context) ServersTransportOutput
}
func (*ServersTransport) ElementType() reflect.Type {
return reflect.TypeOf((**ServersTransport)(nil)).Elem()
}
func (i *ServersTransport) ToServersTransportOutput() ServersTransportOutput {
return i.ToServersTransportOutputWithContext(context.Background())
}
func (i *ServersTransport) ToServersTransportOutputWithContext(ctx context.Context) ServersTransportOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServersTransportOutput)
}
func (i *ServersTransport) ToOutput(ctx context.Context) pulumix.Output[*ServersTransport] {
return pulumix.Output[*ServersTransport]{
OutputState: i.ToServersTransportOutputWithContext(ctx).OutputState,
}
}
type ServersTransportOutput struct{ *pulumi.OutputState }
func (ServersTransportOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ServersTransport)(nil)).Elem()
}
func (o ServersTransportOutput) ToServersTransportOutput() ServersTransportOutput {
return o
}
func (o ServersTransportOutput) ToServersTransportOutputWithContext(ctx context.Context) ServersTransportOutput {
return o
}
func (o ServersTransportOutput) ToOutput(ctx context.Context) pulumix.Output[*ServersTransport] {
return pulumix.Output[*ServersTransport]{
OutputState: o.OutputState,
}
}
func (o ServersTransportOutput) ApiVersion() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServersTransport) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput)
}
func (o ServersTransportOutput) Kind() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServersTransport) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput)
}
func (o ServersTransportOutput) Metadata() v1.ObjectMetaOutput {
return o.ApplyT(func(v *ServersTransport) v1.ObjectMetaOutput { return v.Metadata }).(v1.ObjectMetaOutput)
}
// ServersTransportSpec defines the desired state of a ServersTransport.
func (o ServersTransportOutput) Spec() ServersTransportSpecOutput {
return o.ApplyT(func(v *ServersTransport) ServersTransportSpecOutput { return v.Spec }).(ServersTransportSpecOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ServersTransportInput)(nil)).Elem(), &ServersTransport{})
pulumi.RegisterOutputType(ServersTransportOutput{})
}