pulumi-library/crds/kubernetes/hub/v1alpha1/apiportal.go

166 lines
5.2 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"
)
// APIPortal defines a developer portal for accessing the documentation of APIs.
type APIPortal struct {
pulumi.CustomResourceState
ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"`
Kind pulumi.StringPtrOutput `pulumi:"kind"`
Metadata v1.ObjectMetaPtrOutput `pulumi:"metadata"`
// The desired behavior of this APIPortal.
Spec APIPortalSpecPtrOutput `pulumi:"spec"`
// The current status of this APIPortal.
Status APIPortalStatusPtrOutput `pulumi:"status"`
}
// NewAPIPortal registers a new resource with the given unique name, arguments, and options.
func NewAPIPortal(ctx *pulumi.Context,
name string, args *APIPortalArgs, opts ...pulumi.ResourceOption) (*APIPortal, error) {
if args == nil {
args = &APIPortalArgs{}
}
args.ApiVersion = pulumi.StringPtr("hub.traefik.io/v1alpha1")
args.Kind = pulumi.StringPtr("APIPortal")
opts = internal.PkgResourceDefaultOpts(opts)
var resource APIPortal
err := ctx.RegisterResource("kubernetes:hub.traefik.io/v1alpha1:APIPortal", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAPIPortal gets an existing APIPortal 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 GetAPIPortal(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *APIPortalState, opts ...pulumi.ResourceOption) (*APIPortal, error) {
var resource APIPortal
err := ctx.ReadResource("kubernetes:hub.traefik.io/v1alpha1:APIPortal", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering APIPortal resources.
type apiportalState struct {
}
type APIPortalState struct {
}
func (APIPortalState) ElementType() reflect.Type {
return reflect.TypeOf((*apiportalState)(nil)).Elem()
}
type apiportalArgs struct {
ApiVersion *string `pulumi:"apiVersion"`
Kind *string `pulumi:"kind"`
Metadata *v1.ObjectMeta `pulumi:"metadata"`
// The desired behavior of this APIPortal.
Spec *APIPortalSpec `pulumi:"spec"`
// The current status of this APIPortal.
Status *APIPortalStatus `pulumi:"status"`
}
// The set of arguments for constructing a APIPortal resource.
type APIPortalArgs struct {
ApiVersion pulumi.StringPtrInput
Kind pulumi.StringPtrInput
Metadata v1.ObjectMetaPtrInput
// The desired behavior of this APIPortal.
Spec APIPortalSpecPtrInput
// The current status of this APIPortal.
Status APIPortalStatusPtrInput
}
func (APIPortalArgs) ElementType() reflect.Type {
return reflect.TypeOf((*apiportalArgs)(nil)).Elem()
}
type APIPortalInput interface {
pulumi.Input
ToAPIPortalOutput() APIPortalOutput
ToAPIPortalOutputWithContext(ctx context.Context) APIPortalOutput
}
func (*APIPortal) ElementType() reflect.Type {
return reflect.TypeOf((**APIPortal)(nil)).Elem()
}
func (i *APIPortal) ToAPIPortalOutput() APIPortalOutput {
return i.ToAPIPortalOutputWithContext(context.Background())
}
func (i *APIPortal) ToAPIPortalOutputWithContext(ctx context.Context) APIPortalOutput {
return pulumi.ToOutputWithContext(ctx, i).(APIPortalOutput)
}
func (i *APIPortal) ToOutput(ctx context.Context) pulumix.Output[*APIPortal] {
return pulumix.Output[*APIPortal]{
OutputState: i.ToAPIPortalOutputWithContext(ctx).OutputState,
}
}
type APIPortalOutput struct{ *pulumi.OutputState }
func (APIPortalOutput) ElementType() reflect.Type {
return reflect.TypeOf((**APIPortal)(nil)).Elem()
}
func (o APIPortalOutput) ToAPIPortalOutput() APIPortalOutput {
return o
}
func (o APIPortalOutput) ToAPIPortalOutputWithContext(ctx context.Context) APIPortalOutput {
return o
}
func (o APIPortalOutput) ToOutput(ctx context.Context) pulumix.Output[*APIPortal] {
return pulumix.Output[*APIPortal]{
OutputState: o.OutputState,
}
}
func (o APIPortalOutput) ApiVersion() pulumi.StringPtrOutput {
return o.ApplyT(func(v *APIPortal) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput)
}
func (o APIPortalOutput) Kind() pulumi.StringPtrOutput {
return o.ApplyT(func(v *APIPortal) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput)
}
func (o APIPortalOutput) Metadata() v1.ObjectMetaPtrOutput {
return o.ApplyT(func(v *APIPortal) v1.ObjectMetaPtrOutput { return v.Metadata }).(v1.ObjectMetaPtrOutput)
}
// The desired behavior of this APIPortal.
func (o APIPortalOutput) Spec() APIPortalSpecPtrOutput {
return o.ApplyT(func(v *APIPortal) APIPortalSpecPtrOutput { return v.Spec }).(APIPortalSpecPtrOutput)
}
// The current status of this APIPortal.
func (o APIPortalOutput) Status() APIPortalStatusPtrOutput {
return o.ApplyT(func(v *APIPortal) APIPortalStatusPtrOutput { return v.Status }).(APIPortalStatusPtrOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*APIPortalInput)(nil)).Elem(), &APIPortal{})
pulumi.RegisterOutputType(APIPortalOutput{})
}