/
consentArtifact.go
239 lines (203 loc) · 10.4 KB
/
consentArtifact.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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
// 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 v1beta1
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-google-native/sdk/go/google/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Creates a new Consent artifact in the parent consent store.
type ConsentArtifact struct {
pulumi.CustomResourceState
// Optional. Screenshots, PDFs, or other binary information documenting the user's consent.
ConsentContentScreenshots ImageResponseArrayOutput `pulumi:"consentContentScreenshots"`
// Optional. An string indicating the version of the consent information shown to the user.
ConsentContentVersion pulumi.StringOutput `pulumi:"consentContentVersion"`
ConsentStoreId pulumi.StringOutput `pulumi:"consentStoreId"`
DatasetId pulumi.StringOutput `pulumi:"datasetId"`
// Optional. A signature from a guardian.
GuardianSignature SignatureResponseOutput `pulumi:"guardianSignature"`
Location pulumi.StringOutput `pulumi:"location"`
// Optional. Metadata associated with the Consent artifact. For example, the consent locale or user agent version.
Metadata pulumi.StringMapOutput `pulumi:"metadata"`
// Resource name of the Consent artifact, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consentArtifacts/{consent_artifact_id}`. Cannot be changed after creation.
Name pulumi.StringOutput `pulumi:"name"`
Project pulumi.StringOutput `pulumi:"project"`
// User's UUID provided by the client.
UserId pulumi.StringOutput `pulumi:"userId"`
// Optional. User's signature.
UserSignature SignatureResponseOutput `pulumi:"userSignature"`
// Optional. A signature from a witness.
WitnessSignature SignatureResponseOutput `pulumi:"witnessSignature"`
}
// NewConsentArtifact registers a new resource with the given unique name, arguments, and options.
func NewConsentArtifact(ctx *pulumi.Context,
name string, args *ConsentArtifactArgs, opts ...pulumi.ResourceOption) (*ConsentArtifact, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ConsentStoreId == nil {
return nil, errors.New("invalid value for required argument 'ConsentStoreId'")
}
if args.DatasetId == nil {
return nil, errors.New("invalid value for required argument 'DatasetId'")
}
if args.UserId == nil {
return nil, errors.New("invalid value for required argument 'UserId'")
}
replaceOnChanges := pulumi.ReplaceOnChanges([]string{
"consentStoreId",
"datasetId",
"location",
"project",
})
opts = append(opts, replaceOnChanges)
opts = internal.PkgResourceDefaultOpts(opts)
var resource ConsentArtifact
err := ctx.RegisterResource("google-native:healthcare/v1beta1:ConsentArtifact", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetConsentArtifact gets an existing ConsentArtifact 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 GetConsentArtifact(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ConsentArtifactState, opts ...pulumi.ResourceOption) (*ConsentArtifact, error) {
var resource ConsentArtifact
err := ctx.ReadResource("google-native:healthcare/v1beta1:ConsentArtifact", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ConsentArtifact resources.
type consentArtifactState struct {
}
type ConsentArtifactState struct {
}
func (ConsentArtifactState) ElementType() reflect.Type {
return reflect.TypeOf((*consentArtifactState)(nil)).Elem()
}
type consentArtifactArgs struct {
// Optional. Screenshots, PDFs, or other binary information documenting the user's consent.
ConsentContentScreenshots []Image `pulumi:"consentContentScreenshots"`
// Optional. An string indicating the version of the consent information shown to the user.
ConsentContentVersion *string `pulumi:"consentContentVersion"`
ConsentStoreId string `pulumi:"consentStoreId"`
DatasetId string `pulumi:"datasetId"`
// Optional. A signature from a guardian.
GuardianSignature *Signature `pulumi:"guardianSignature"`
Location *string `pulumi:"location"`
// Optional. Metadata associated with the Consent artifact. For example, the consent locale or user agent version.
Metadata map[string]string `pulumi:"metadata"`
// Resource name of the Consent artifact, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consentArtifacts/{consent_artifact_id}`. Cannot be changed after creation.
Name *string `pulumi:"name"`
Project *string `pulumi:"project"`
// User's UUID provided by the client.
UserId string `pulumi:"userId"`
// Optional. User's signature.
UserSignature *Signature `pulumi:"userSignature"`
// Optional. A signature from a witness.
WitnessSignature *Signature `pulumi:"witnessSignature"`
}
// The set of arguments for constructing a ConsentArtifact resource.
type ConsentArtifactArgs struct {
// Optional. Screenshots, PDFs, or other binary information documenting the user's consent.
ConsentContentScreenshots ImageArrayInput
// Optional. An string indicating the version of the consent information shown to the user.
ConsentContentVersion pulumi.StringPtrInput
ConsentStoreId pulumi.StringInput
DatasetId pulumi.StringInput
// Optional. A signature from a guardian.
GuardianSignature SignaturePtrInput
Location pulumi.StringPtrInput
// Optional. Metadata associated with the Consent artifact. For example, the consent locale or user agent version.
Metadata pulumi.StringMapInput
// Resource name of the Consent artifact, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consentArtifacts/{consent_artifact_id}`. Cannot be changed after creation.
Name pulumi.StringPtrInput
Project pulumi.StringPtrInput
// User's UUID provided by the client.
UserId pulumi.StringInput
// Optional. User's signature.
UserSignature SignaturePtrInput
// Optional. A signature from a witness.
WitnessSignature SignaturePtrInput
}
func (ConsentArtifactArgs) ElementType() reflect.Type {
return reflect.TypeOf((*consentArtifactArgs)(nil)).Elem()
}
type ConsentArtifactInput interface {
pulumi.Input
ToConsentArtifactOutput() ConsentArtifactOutput
ToConsentArtifactOutputWithContext(ctx context.Context) ConsentArtifactOutput
}
func (*ConsentArtifact) ElementType() reflect.Type {
return reflect.TypeOf((**ConsentArtifact)(nil)).Elem()
}
func (i *ConsentArtifact) ToConsentArtifactOutput() ConsentArtifactOutput {
return i.ToConsentArtifactOutputWithContext(context.Background())
}
func (i *ConsentArtifact) ToConsentArtifactOutputWithContext(ctx context.Context) ConsentArtifactOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConsentArtifactOutput)
}
type ConsentArtifactOutput struct{ *pulumi.OutputState }
func (ConsentArtifactOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ConsentArtifact)(nil)).Elem()
}
func (o ConsentArtifactOutput) ToConsentArtifactOutput() ConsentArtifactOutput {
return o
}
func (o ConsentArtifactOutput) ToConsentArtifactOutputWithContext(ctx context.Context) ConsentArtifactOutput {
return o
}
// Optional. Screenshots, PDFs, or other binary information documenting the user's consent.
func (o ConsentArtifactOutput) ConsentContentScreenshots() ImageResponseArrayOutput {
return o.ApplyT(func(v *ConsentArtifact) ImageResponseArrayOutput { return v.ConsentContentScreenshots }).(ImageResponseArrayOutput)
}
// Optional. An string indicating the version of the consent information shown to the user.
func (o ConsentArtifactOutput) ConsentContentVersion() pulumi.StringOutput {
return o.ApplyT(func(v *ConsentArtifact) pulumi.StringOutput { return v.ConsentContentVersion }).(pulumi.StringOutput)
}
func (o ConsentArtifactOutput) ConsentStoreId() pulumi.StringOutput {
return o.ApplyT(func(v *ConsentArtifact) pulumi.StringOutput { return v.ConsentStoreId }).(pulumi.StringOutput)
}
func (o ConsentArtifactOutput) DatasetId() pulumi.StringOutput {
return o.ApplyT(func(v *ConsentArtifact) pulumi.StringOutput { return v.DatasetId }).(pulumi.StringOutput)
}
// Optional. A signature from a guardian.
func (o ConsentArtifactOutput) GuardianSignature() SignatureResponseOutput {
return o.ApplyT(func(v *ConsentArtifact) SignatureResponseOutput { return v.GuardianSignature }).(SignatureResponseOutput)
}
func (o ConsentArtifactOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *ConsentArtifact) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Optional. Metadata associated with the Consent artifact. For example, the consent locale or user agent version.
func (o ConsentArtifactOutput) Metadata() pulumi.StringMapOutput {
return o.ApplyT(func(v *ConsentArtifact) pulumi.StringMapOutput { return v.Metadata }).(pulumi.StringMapOutput)
}
// Resource name of the Consent artifact, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consentArtifacts/{consent_artifact_id}`. Cannot be changed after creation.
func (o ConsentArtifactOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ConsentArtifact) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
func (o ConsentArtifactOutput) Project() pulumi.StringOutput {
return o.ApplyT(func(v *ConsentArtifact) pulumi.StringOutput { return v.Project }).(pulumi.StringOutput)
}
// User's UUID provided by the client.
func (o ConsentArtifactOutput) UserId() pulumi.StringOutput {
return o.ApplyT(func(v *ConsentArtifact) pulumi.StringOutput { return v.UserId }).(pulumi.StringOutput)
}
// Optional. User's signature.
func (o ConsentArtifactOutput) UserSignature() SignatureResponseOutput {
return o.ApplyT(func(v *ConsentArtifact) SignatureResponseOutput { return v.UserSignature }).(SignatureResponseOutput)
}
// Optional. A signature from a witness.
func (o ConsentArtifactOutput) WitnessSignature() SignatureResponseOutput {
return o.ApplyT(func(v *ConsentArtifact) SignatureResponseOutput { return v.WitnessSignature }).(SignatureResponseOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ConsentArtifactInput)(nil)).Elem(), &ConsentArtifact{})
pulumi.RegisterOutputType(ConsentArtifactOutput{})
}