/
process.go
180 lines (149 loc) · 8.55 KB
/
process.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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
// Code generated by the Pulumi SDK Generator DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package v1
import (
"context"
"reflect"
"github.com/pulumi/pulumi-google-native/sdk/go/google/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Creates a new process.
type Process struct {
pulumi.CustomResourceState
// Optional. The attributes of the process. Should only be used for the purpose of non-semantic management (classifying, describing or labeling the process). Up to 100 attributes are allowed.
Attributes pulumi.StringMapOutput `pulumi:"attributes"`
// Optional. A human-readable name you can set to display in a user interface. Must be not longer than 200 characters and only contain UTF-8 letters or numbers, spaces or characters like `_-:&.`
DisplayName pulumi.StringOutput `pulumi:"displayName"`
Location pulumi.StringOutput `pulumi:"location"`
// Immutable. The resource name of the lineage process. Format: `projects/{project}/locations/{location}/processes/{process}`. Can be specified or auto-assigned. {process} must be not longer than 200 characters and only contain characters in a set: `a-zA-Z0-9_-:.`
Name pulumi.StringOutput `pulumi:"name"`
// Optional. The origin of this process and its runs and lineage events.
Origin GoogleCloudDatacatalogLineageV1OriginResponseOutput `pulumi:"origin"`
Project pulumi.StringOutput `pulumi:"project"`
// A unique identifier for this request. Restricted to 36 ASCII characters. A random UUID is recommended. This request is idempotent only if a `request_id` is provided.
RequestId pulumi.StringPtrOutput `pulumi:"requestId"`
}
// NewProcess registers a new resource with the given unique name, arguments, and options.
func NewProcess(ctx *pulumi.Context,
name string, args *ProcessArgs, opts ...pulumi.ResourceOption) (*Process, error) {
if args == nil {
args = &ProcessArgs{}
}
replaceOnChanges := pulumi.ReplaceOnChanges([]string{
"location",
"project",
})
opts = append(opts, replaceOnChanges)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Process
err := ctx.RegisterResource("google-native:datalineage/v1:Process", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetProcess gets an existing Process 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 GetProcess(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ProcessState, opts ...pulumi.ResourceOption) (*Process, error) {
var resource Process
err := ctx.ReadResource("google-native:datalineage/v1:Process", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Process resources.
type processState struct {
}
type ProcessState struct {
}
func (ProcessState) ElementType() reflect.Type {
return reflect.TypeOf((*processState)(nil)).Elem()
}
type processArgs struct {
// Optional. The attributes of the process. Should only be used for the purpose of non-semantic management (classifying, describing or labeling the process). Up to 100 attributes are allowed.
Attributes map[string]string `pulumi:"attributes"`
// Optional. A human-readable name you can set to display in a user interface. Must be not longer than 200 characters and only contain UTF-8 letters or numbers, spaces or characters like `_-:&.`
DisplayName *string `pulumi:"displayName"`
Location *string `pulumi:"location"`
// Immutable. The resource name of the lineage process. Format: `projects/{project}/locations/{location}/processes/{process}`. Can be specified or auto-assigned. {process} must be not longer than 200 characters and only contain characters in a set: `a-zA-Z0-9_-:.`
Name *string `pulumi:"name"`
// Optional. The origin of this process and its runs and lineage events.
Origin *GoogleCloudDatacatalogLineageV1Origin `pulumi:"origin"`
Project *string `pulumi:"project"`
// A unique identifier for this request. Restricted to 36 ASCII characters. A random UUID is recommended. This request is idempotent only if a `request_id` is provided.
RequestId *string `pulumi:"requestId"`
}
// The set of arguments for constructing a Process resource.
type ProcessArgs struct {
// Optional. The attributes of the process. Should only be used for the purpose of non-semantic management (classifying, describing or labeling the process). Up to 100 attributes are allowed.
Attributes pulumi.StringMapInput
// Optional. A human-readable name you can set to display in a user interface. Must be not longer than 200 characters and only contain UTF-8 letters or numbers, spaces or characters like `_-:&.`
DisplayName pulumi.StringPtrInput
Location pulumi.StringPtrInput
// Immutable. The resource name of the lineage process. Format: `projects/{project}/locations/{location}/processes/{process}`. Can be specified or auto-assigned. {process} must be not longer than 200 characters and only contain characters in a set: `a-zA-Z0-9_-:.`
Name pulumi.StringPtrInput
// Optional. The origin of this process and its runs and lineage events.
Origin GoogleCloudDatacatalogLineageV1OriginPtrInput
Project pulumi.StringPtrInput
// A unique identifier for this request. Restricted to 36 ASCII characters. A random UUID is recommended. This request is idempotent only if a `request_id` is provided.
RequestId pulumi.StringPtrInput
}
func (ProcessArgs) ElementType() reflect.Type {
return reflect.TypeOf((*processArgs)(nil)).Elem()
}
type ProcessInput interface {
pulumi.Input
ToProcessOutput() ProcessOutput
ToProcessOutputWithContext(ctx context.Context) ProcessOutput
}
func (*Process) ElementType() reflect.Type {
return reflect.TypeOf((**Process)(nil)).Elem()
}
func (i *Process) ToProcessOutput() ProcessOutput {
return i.ToProcessOutputWithContext(context.Background())
}
func (i *Process) ToProcessOutputWithContext(ctx context.Context) ProcessOutput {
return pulumi.ToOutputWithContext(ctx, i).(ProcessOutput)
}
type ProcessOutput struct{ *pulumi.OutputState }
func (ProcessOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Process)(nil)).Elem()
}
func (o ProcessOutput) ToProcessOutput() ProcessOutput {
return o
}
func (o ProcessOutput) ToProcessOutputWithContext(ctx context.Context) ProcessOutput {
return o
}
// Optional. The attributes of the process. Should only be used for the purpose of non-semantic management (classifying, describing or labeling the process). Up to 100 attributes are allowed.
func (o ProcessOutput) Attributes() pulumi.StringMapOutput {
return o.ApplyT(func(v *Process) pulumi.StringMapOutput { return v.Attributes }).(pulumi.StringMapOutput)
}
// Optional. A human-readable name you can set to display in a user interface. Must be not longer than 200 characters and only contain UTF-8 letters or numbers, spaces or characters like `_-:&.`
func (o ProcessOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *Process) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
func (o ProcessOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Process) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Immutable. The resource name of the lineage process. Format: `projects/{project}/locations/{location}/processes/{process}`. Can be specified or auto-assigned. {process} must be not longer than 200 characters and only contain characters in a set: `a-zA-Z0-9_-:.`
func (o ProcessOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Process) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Optional. The origin of this process and its runs and lineage events.
func (o ProcessOutput) Origin() GoogleCloudDatacatalogLineageV1OriginResponseOutput {
return o.ApplyT(func(v *Process) GoogleCloudDatacatalogLineageV1OriginResponseOutput { return v.Origin }).(GoogleCloudDatacatalogLineageV1OriginResponseOutput)
}
func (o ProcessOutput) Project() pulumi.StringOutput {
return o.ApplyT(func(v *Process) pulumi.StringOutput { return v.Project }).(pulumi.StringOutput)
}
// A unique identifier for this request. Restricted to 36 ASCII characters. A random UUID is recommended. This request is idempotent only if a `request_id` is provided.
func (o ProcessOutput) RequestId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Process) pulumi.StringPtrOutput { return v.RequestId }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ProcessInput)(nil)).Elem(), &Process{})
pulumi.RegisterOutputType(ProcessOutput{})
}