-
Notifications
You must be signed in to change notification settings - Fork 0
/
projectColumn.go
96 lines (84 loc) · 3.11 KB
/
projectColumn.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package github
import (
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/go/pulumi"
)
// This resource allows you to create and manage columns for GitHub projects.
//
// > This content is derived from https://github.com/terraform-providers/terraform-provider-github/blob/master/website/docs/r/project_column.html.markdown.
type ProjectColumn struct {
s *pulumi.ResourceState
}
// NewProjectColumn registers a new resource with the given unique name, arguments, and options.
func NewProjectColumn(ctx *pulumi.Context,
name string, args *ProjectColumnArgs, opts ...pulumi.ResourceOpt) (*ProjectColumn, error) {
if args == nil || args.ProjectId == nil {
return nil, errors.New("missing required argument 'ProjectId'")
}
inputs := make(map[string]interface{})
if args == nil {
inputs["name"] = nil
inputs["projectId"] = nil
} else {
inputs["name"] = args.Name
inputs["projectId"] = args.ProjectId
}
inputs["etag"] = nil
s, err := ctx.RegisterResource("github:index/projectColumn:ProjectColumn", name, true, inputs, opts...)
if err != nil {
return nil, err
}
return &ProjectColumn{s: s}, nil
}
// GetProjectColumn gets an existing ProjectColumn 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 GetProjectColumn(ctx *pulumi.Context,
name string, id pulumi.ID, state *ProjectColumnState, opts ...pulumi.ResourceOpt) (*ProjectColumn, error) {
inputs := make(map[string]interface{})
if state != nil {
inputs["etag"] = state.Etag
inputs["name"] = state.Name
inputs["projectId"] = state.ProjectId
}
s, err := ctx.ReadResource("github:index/projectColumn:ProjectColumn", name, id, inputs, opts...)
if err != nil {
return nil, err
}
return &ProjectColumn{s: s}, nil
}
// URN is this resource's unique name assigned by Pulumi.
func (r *ProjectColumn) URN() *pulumi.URNOutput {
return r.s.URN()
}
// ID is this resource's unique identifier assigned by its provider.
func (r *ProjectColumn) ID() *pulumi.IDOutput {
return r.s.ID()
}
func (r *ProjectColumn) Etag() *pulumi.StringOutput {
return (*pulumi.StringOutput)(r.s.State["etag"])
}
// The name of the column.
func (r *ProjectColumn) Name() *pulumi.StringOutput {
return (*pulumi.StringOutput)(r.s.State["name"])
}
// The id of an existing project that the column will be created in.
func (r *ProjectColumn) ProjectId() *pulumi.StringOutput {
return (*pulumi.StringOutput)(r.s.State["projectId"])
}
// Input properties used for looking up and filtering ProjectColumn resources.
type ProjectColumnState struct {
Etag interface{}
// The name of the column.
Name interface{}
// The id of an existing project that the column will be created in.
ProjectId interface{}
}
// The set of arguments for constructing a ProjectColumn resource.
type ProjectColumnArgs struct {
// The name of the column.
Name interface{}
// The id of an existing project that the column will be created in.
ProjectId interface{}
}