wip: init go provider
This commit is contained in:
265
sdk/go/incus/project.go
generated
Normal file
265
sdk/go/incus/project.go
generated
Normal file
@@ -0,0 +1,265 @@
|
||||
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
|
||||
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
|
||||
|
||||
package incus
|
||||
|
||||
import (
|
||||
"context"
|
||||
"reflect"
|
||||
|
||||
"git.kalinow.ski/nimbus/pulumi-incus/sdk/go/incus/internal"
|
||||
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
|
||||
)
|
||||
|
||||
type Project struct {
|
||||
pulumi.CustomResourceState
|
||||
|
||||
// *Optional* - Map of key/value pairs of [project config settings](https://linuxcontainers.org/incus/docs/main/reference/projects/).
|
||||
Config pulumi.StringMapOutput `pulumi:"config"`
|
||||
// *Optional* - Description of the project.
|
||||
Description pulumi.StringOutput `pulumi:"description"`
|
||||
// **Required** - Name of the project.
|
||||
Name pulumi.StringOutput `pulumi:"name"`
|
||||
// *Optional* - The remote in which the resource will be created. If
|
||||
// not provided, the provider's default remote will be used.
|
||||
Remote pulumi.StringPtrOutput `pulumi:"remote"`
|
||||
}
|
||||
|
||||
// NewProject registers a new resource with the given unique name, arguments, and options.
|
||||
func NewProject(ctx *pulumi.Context,
|
||||
name string, args *ProjectArgs, opts ...pulumi.ResourceOption) (*Project, error) {
|
||||
if args == nil {
|
||||
args = &ProjectArgs{}
|
||||
}
|
||||
|
||||
opts = internal.PkgResourceDefaultOpts(opts)
|
||||
var resource Project
|
||||
err := ctx.RegisterResource("incus:index/project:Project", name, args, &resource, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &resource, nil
|
||||
}
|
||||
|
||||
// GetProject gets an existing Project 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 GetProject(ctx *pulumi.Context,
|
||||
name string, id pulumi.IDInput, state *ProjectState, opts ...pulumi.ResourceOption) (*Project, error) {
|
||||
var resource Project
|
||||
err := ctx.ReadResource("incus:index/project:Project", name, id, state, &resource, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &resource, nil
|
||||
}
|
||||
|
||||
// Input properties used for looking up and filtering Project resources.
|
||||
type projectState struct {
|
||||
// *Optional* - Map of key/value pairs of [project config settings](https://linuxcontainers.org/incus/docs/main/reference/projects/).
|
||||
Config map[string]string `pulumi:"config"`
|
||||
// *Optional* - Description of the project.
|
||||
Description *string `pulumi:"description"`
|
||||
// **Required** - Name of the project.
|
||||
Name *string `pulumi:"name"`
|
||||
// *Optional* - The remote in which the resource will be created. If
|
||||
// not provided, the provider's default remote will be used.
|
||||
Remote *string `pulumi:"remote"`
|
||||
}
|
||||
|
||||
type ProjectState struct {
|
||||
// *Optional* - Map of key/value pairs of [project config settings](https://linuxcontainers.org/incus/docs/main/reference/projects/).
|
||||
Config pulumi.StringMapInput
|
||||
// *Optional* - Description of the project.
|
||||
Description pulumi.StringPtrInput
|
||||
// **Required** - Name of the project.
|
||||
Name pulumi.StringPtrInput
|
||||
// *Optional* - The remote in which the resource will be created. If
|
||||
// not provided, the provider's default remote will be used.
|
||||
Remote pulumi.StringPtrInput
|
||||
}
|
||||
|
||||
func (ProjectState) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*projectState)(nil)).Elem()
|
||||
}
|
||||
|
||||
type projectArgs struct {
|
||||
// *Optional* - Map of key/value pairs of [project config settings](https://linuxcontainers.org/incus/docs/main/reference/projects/).
|
||||
Config map[string]string `pulumi:"config"`
|
||||
// *Optional* - Description of the project.
|
||||
Description *string `pulumi:"description"`
|
||||
// **Required** - Name of the project.
|
||||
Name *string `pulumi:"name"`
|
||||
// *Optional* - The remote in which the resource will be created. If
|
||||
// not provided, the provider's default remote will be used.
|
||||
Remote *string `pulumi:"remote"`
|
||||
}
|
||||
|
||||
// The set of arguments for constructing a Project resource.
|
||||
type ProjectArgs struct {
|
||||
// *Optional* - Map of key/value pairs of [project config settings](https://linuxcontainers.org/incus/docs/main/reference/projects/).
|
||||
Config pulumi.StringMapInput
|
||||
// *Optional* - Description of the project.
|
||||
Description pulumi.StringPtrInput
|
||||
// **Required** - Name of the project.
|
||||
Name pulumi.StringPtrInput
|
||||
// *Optional* - The remote in which the resource will be created. If
|
||||
// not provided, the provider's default remote will be used.
|
||||
Remote pulumi.StringPtrInput
|
||||
}
|
||||
|
||||
func (ProjectArgs) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*projectArgs)(nil)).Elem()
|
||||
}
|
||||
|
||||
type ProjectInput interface {
|
||||
pulumi.Input
|
||||
|
||||
ToProjectOutput() ProjectOutput
|
||||
ToProjectOutputWithContext(ctx context.Context) ProjectOutput
|
||||
}
|
||||
|
||||
func (*Project) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((**Project)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (i *Project) ToProjectOutput() ProjectOutput {
|
||||
return i.ToProjectOutputWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (i *Project) ToProjectOutputWithContext(ctx context.Context) ProjectOutput {
|
||||
return pulumi.ToOutputWithContext(ctx, i).(ProjectOutput)
|
||||
}
|
||||
|
||||
// ProjectArrayInput is an input type that accepts ProjectArray and ProjectArrayOutput values.
|
||||
// You can construct a concrete instance of `ProjectArrayInput` via:
|
||||
//
|
||||
// ProjectArray{ ProjectArgs{...} }
|
||||
type ProjectArrayInput interface {
|
||||
pulumi.Input
|
||||
|
||||
ToProjectArrayOutput() ProjectArrayOutput
|
||||
ToProjectArrayOutputWithContext(context.Context) ProjectArrayOutput
|
||||
}
|
||||
|
||||
type ProjectArray []ProjectInput
|
||||
|
||||
func (ProjectArray) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*[]*Project)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (i ProjectArray) ToProjectArrayOutput() ProjectArrayOutput {
|
||||
return i.ToProjectArrayOutputWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (i ProjectArray) ToProjectArrayOutputWithContext(ctx context.Context) ProjectArrayOutput {
|
||||
return pulumi.ToOutputWithContext(ctx, i).(ProjectArrayOutput)
|
||||
}
|
||||
|
||||
// ProjectMapInput is an input type that accepts ProjectMap and ProjectMapOutput values.
|
||||
// You can construct a concrete instance of `ProjectMapInput` via:
|
||||
//
|
||||
// ProjectMap{ "key": ProjectArgs{...} }
|
||||
type ProjectMapInput interface {
|
||||
pulumi.Input
|
||||
|
||||
ToProjectMapOutput() ProjectMapOutput
|
||||
ToProjectMapOutputWithContext(context.Context) ProjectMapOutput
|
||||
}
|
||||
|
||||
type ProjectMap map[string]ProjectInput
|
||||
|
||||
func (ProjectMap) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*map[string]*Project)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (i ProjectMap) ToProjectMapOutput() ProjectMapOutput {
|
||||
return i.ToProjectMapOutputWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (i ProjectMap) ToProjectMapOutputWithContext(ctx context.Context) ProjectMapOutput {
|
||||
return pulumi.ToOutputWithContext(ctx, i).(ProjectMapOutput)
|
||||
}
|
||||
|
||||
type ProjectOutput struct{ *pulumi.OutputState }
|
||||
|
||||
func (ProjectOutput) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((**Project)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (o ProjectOutput) ToProjectOutput() ProjectOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o ProjectOutput) ToProjectOutputWithContext(ctx context.Context) ProjectOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
// *Optional* - Map of key/value pairs of [project config settings](https://linuxcontainers.org/incus/docs/main/reference/projects/).
|
||||
func (o ProjectOutput) Config() pulumi.StringMapOutput {
|
||||
return o.ApplyT(func(v *Project) pulumi.StringMapOutput { return v.Config }).(pulumi.StringMapOutput)
|
||||
}
|
||||
|
||||
// *Optional* - Description of the project.
|
||||
func (o ProjectOutput) Description() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v *Project) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
// **Required** - Name of the project.
|
||||
func (o ProjectOutput) Name() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v *Project) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
// *Optional* - The remote in which the resource will be created. If
|
||||
// not provided, the provider's default remote will be used.
|
||||
func (o ProjectOutput) Remote() pulumi.StringPtrOutput {
|
||||
return o.ApplyT(func(v *Project) pulumi.StringPtrOutput { return v.Remote }).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
type ProjectArrayOutput struct{ *pulumi.OutputState }
|
||||
|
||||
func (ProjectArrayOutput) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*[]*Project)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (o ProjectArrayOutput) ToProjectArrayOutput() ProjectArrayOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o ProjectArrayOutput) ToProjectArrayOutputWithContext(ctx context.Context) ProjectArrayOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o ProjectArrayOutput) Index(i pulumi.IntInput) ProjectOutput {
|
||||
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Project {
|
||||
return vs[0].([]*Project)[vs[1].(int)]
|
||||
}).(ProjectOutput)
|
||||
}
|
||||
|
||||
type ProjectMapOutput struct{ *pulumi.OutputState }
|
||||
|
||||
func (ProjectMapOutput) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*map[string]*Project)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (o ProjectMapOutput) ToProjectMapOutput() ProjectMapOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o ProjectMapOutput) ToProjectMapOutputWithContext(ctx context.Context) ProjectMapOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o ProjectMapOutput) MapIndex(k pulumi.StringInput) ProjectOutput {
|
||||
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Project {
|
||||
return vs[0].(map[string]*Project)[vs[1].(string)]
|
||||
}).(ProjectOutput)
|
||||
}
|
||||
|
||||
func init() {
|
||||
pulumi.RegisterInputType(reflect.TypeOf((*ProjectInput)(nil)).Elem(), &Project{})
|
||||
pulumi.RegisterInputType(reflect.TypeOf((*ProjectArrayInput)(nil)).Elem(), ProjectArray{})
|
||||
pulumi.RegisterInputType(reflect.TypeOf((*ProjectMapInput)(nil)).Elem(), ProjectMap{})
|
||||
pulumi.RegisterOutputType(ProjectOutput{})
|
||||
pulumi.RegisterOutputType(ProjectArrayOutput{})
|
||||
pulumi.RegisterOutputType(ProjectMapOutput{})
|
||||
}
|
||||
Reference in New Issue
Block a user