/
view.go
172 lines (141 loc) · 5.49 KB
/
view.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
// 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 view.
type View struct {
pulumi.CustomResourceState
// The time at which this view was created.
CreateTime pulumi.StringOutput `pulumi:"createTime"`
// The human-readable display name of the view.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
Location pulumi.StringOutput `pulumi:"location"`
// Immutable. The resource name of the view. Format: projects/{project}/locations/{location}/views/{view}
Name pulumi.StringOutput `pulumi:"name"`
Project pulumi.StringOutput `pulumi:"project"`
// The most recent time at which the view was updated.
UpdateTime pulumi.StringOutput `pulumi:"updateTime"`
// String with specific view properties, must be non-empty.
Value pulumi.StringOutput `pulumi:"value"`
}
// NewView registers a new resource with the given unique name, arguments, and options.
func NewView(ctx *pulumi.Context,
name string, args *ViewArgs, opts ...pulumi.ResourceOption) (*View, error) {
if args == nil {
args = &ViewArgs{}
}
replaceOnChanges := pulumi.ReplaceOnChanges([]string{
"location",
"project",
})
opts = append(opts, replaceOnChanges)
opts = internal.PkgResourceDefaultOpts(opts)
var resource View
err := ctx.RegisterResource("google-native:contactcenterinsights/v1:View", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetView gets an existing View 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 GetView(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ViewState, opts ...pulumi.ResourceOption) (*View, error) {
var resource View
err := ctx.ReadResource("google-native:contactcenterinsights/v1:View", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering View resources.
type viewState struct {
}
type ViewState struct {
}
func (ViewState) ElementType() reflect.Type {
return reflect.TypeOf((*viewState)(nil)).Elem()
}
type viewArgs struct {
// The human-readable display name of the view.
DisplayName *string `pulumi:"displayName"`
Location *string `pulumi:"location"`
// Immutable. The resource name of the view. Format: projects/{project}/locations/{location}/views/{view}
Name *string `pulumi:"name"`
Project *string `pulumi:"project"`
// String with specific view properties, must be non-empty.
Value *string `pulumi:"value"`
}
// The set of arguments for constructing a View resource.
type ViewArgs struct {
// The human-readable display name of the view.
DisplayName pulumi.StringPtrInput
Location pulumi.StringPtrInput
// Immutable. The resource name of the view. Format: projects/{project}/locations/{location}/views/{view}
Name pulumi.StringPtrInput
Project pulumi.StringPtrInput
// String with specific view properties, must be non-empty.
Value pulumi.StringPtrInput
}
func (ViewArgs) ElementType() reflect.Type {
return reflect.TypeOf((*viewArgs)(nil)).Elem()
}
type ViewInput interface {
pulumi.Input
ToViewOutput() ViewOutput
ToViewOutputWithContext(ctx context.Context) ViewOutput
}
func (*View) ElementType() reflect.Type {
return reflect.TypeOf((**View)(nil)).Elem()
}
func (i *View) ToViewOutput() ViewOutput {
return i.ToViewOutputWithContext(context.Background())
}
func (i *View) ToViewOutputWithContext(ctx context.Context) ViewOutput {
return pulumi.ToOutputWithContext(ctx, i).(ViewOutput)
}
type ViewOutput struct{ *pulumi.OutputState }
func (ViewOutput) ElementType() reflect.Type {
return reflect.TypeOf((**View)(nil)).Elem()
}
func (o ViewOutput) ToViewOutput() ViewOutput {
return o
}
func (o ViewOutput) ToViewOutputWithContext(ctx context.Context) ViewOutput {
return o
}
// The time at which this view was created.
func (o ViewOutput) CreateTime() pulumi.StringOutput {
return o.ApplyT(func(v *View) pulumi.StringOutput { return v.CreateTime }).(pulumi.StringOutput)
}
// The human-readable display name of the view.
func (o ViewOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *View) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
func (o ViewOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *View) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Immutable. The resource name of the view. Format: projects/{project}/locations/{location}/views/{view}
func (o ViewOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *View) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
func (o ViewOutput) Project() pulumi.StringOutput {
return o.ApplyT(func(v *View) pulumi.StringOutput { return v.Project }).(pulumi.StringOutput)
}
// The most recent time at which the view was updated.
func (o ViewOutput) UpdateTime() pulumi.StringOutput {
return o.ApplyT(func(v *View) pulumi.StringOutput { return v.UpdateTime }).(pulumi.StringOutput)
}
// String with specific view properties, must be non-empty.
func (o ViewOutput) Value() pulumi.StringOutput {
return o.ApplyT(func(v *View) pulumi.StringOutput { return v.Value }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ViewInput)(nil)).Elem(), &View{})
pulumi.RegisterOutputType(ViewOutput{})
}