// 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" ) // APIVersion defines a version of an API. type APIVersion struct { pulumi.CustomResourceState ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"` Kind pulumi.StringPtrOutput `pulumi:"kind"` Metadata v1.ObjectMetaPtrOutput `pulumi:"metadata"` // The desired behavior of this APIVersion. Spec APIVersionSpecPtrOutput `pulumi:"spec"` // The current status of this APIVersion. Status APIVersionStatusPtrOutput `pulumi:"status"` } // NewAPIVersion registers a new resource with the given unique name, arguments, and options. func NewAPIVersion(ctx *pulumi.Context, name string, args *APIVersionArgs, opts ...pulumi.ResourceOption) (*APIVersion, error) { if args == nil { args = &APIVersionArgs{} } args.ApiVersion = pulumi.StringPtr("hub.traefik.io/v1alpha1") args.Kind = pulumi.StringPtr("APIVersion") opts = internal.PkgResourceDefaultOpts(opts) var resource APIVersion err := ctx.RegisterResource("kubernetes:hub.traefik.io/v1alpha1:APIVersion", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetAPIVersion gets an existing APIVersion 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 GetAPIVersion(ctx *pulumi.Context, name string, id pulumi.IDInput, state *APIVersionState, opts ...pulumi.ResourceOption) (*APIVersion, error) { var resource APIVersion err := ctx.ReadResource("kubernetes:hub.traefik.io/v1alpha1:APIVersion", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering APIVersion resources. type apiversionState struct { } type APIVersionState struct { } func (APIVersionState) ElementType() reflect.Type { return reflect.TypeOf((*apiversionState)(nil)).Elem() } type apiversionArgs struct { ApiVersion *string `pulumi:"apiVersion"` Kind *string `pulumi:"kind"` Metadata *v1.ObjectMeta `pulumi:"metadata"` // The desired behavior of this APIVersion. Spec *APIVersionSpec `pulumi:"spec"` // The current status of this APIVersion. Status *APIVersionStatus `pulumi:"status"` } // The set of arguments for constructing a APIVersion resource. type APIVersionArgs struct { ApiVersion pulumi.StringPtrInput Kind pulumi.StringPtrInput Metadata v1.ObjectMetaPtrInput // The desired behavior of this APIVersion. Spec APIVersionSpecPtrInput // The current status of this APIVersion. Status APIVersionStatusPtrInput } func (APIVersionArgs) ElementType() reflect.Type { return reflect.TypeOf((*apiversionArgs)(nil)).Elem() } type APIVersionInput interface { pulumi.Input ToAPIVersionOutput() APIVersionOutput ToAPIVersionOutputWithContext(ctx context.Context) APIVersionOutput } func (*APIVersion) ElementType() reflect.Type { return reflect.TypeOf((**APIVersion)(nil)).Elem() } func (i *APIVersion) ToAPIVersionOutput() APIVersionOutput { return i.ToAPIVersionOutputWithContext(context.Background()) } func (i *APIVersion) ToAPIVersionOutputWithContext(ctx context.Context) APIVersionOutput { return pulumi.ToOutputWithContext(ctx, i).(APIVersionOutput) } func (i *APIVersion) ToOutput(ctx context.Context) pulumix.Output[*APIVersion] { return pulumix.Output[*APIVersion]{ OutputState: i.ToAPIVersionOutputWithContext(ctx).OutputState, } } type APIVersionOutput struct{ *pulumi.OutputState } func (APIVersionOutput) ElementType() reflect.Type { return reflect.TypeOf((**APIVersion)(nil)).Elem() } func (o APIVersionOutput) ToAPIVersionOutput() APIVersionOutput { return o } func (o APIVersionOutput) ToAPIVersionOutputWithContext(ctx context.Context) APIVersionOutput { return o } func (o APIVersionOutput) ToOutput(ctx context.Context) pulumix.Output[*APIVersion] { return pulumix.Output[*APIVersion]{ OutputState: o.OutputState, } } func (o APIVersionOutput) ApiVersion() pulumi.StringPtrOutput { return o.ApplyT(func(v *APIVersion) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput) } func (o APIVersionOutput) Kind() pulumi.StringPtrOutput { return o.ApplyT(func(v *APIVersion) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput) } func (o APIVersionOutput) Metadata() v1.ObjectMetaPtrOutput { return o.ApplyT(func(v *APIVersion) v1.ObjectMetaPtrOutput { return v.Metadata }).(v1.ObjectMetaPtrOutput) } // The desired behavior of this APIVersion. func (o APIVersionOutput) Spec() APIVersionSpecPtrOutput { return o.ApplyT(func(v *APIVersion) APIVersionSpecPtrOutput { return v.Spec }).(APIVersionSpecPtrOutput) } // The current status of this APIVersion. func (o APIVersionOutput) Status() APIVersionStatusPtrOutput { return o.ApplyT(func(v *APIVersion) APIVersionStatusPtrOutput { return v.Status }).(APIVersionStatusPtrOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*APIVersionInput)(nil)).Elem(), &APIVersion{}) pulumi.RegisterOutputType(APIVersionOutput{}) }