generated from pulumi/pulumi-tf-provider-boilerplate
/
getUser.go
103 lines (84 loc) · 3.11 KB
/
getUser.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
// 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 bitbucket
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumix"
"github.com/ryan-pip/pulumi-bitbucket/sdk/go/bitbucket/internal"
)
func GetUser(ctx *pulumi.Context, args *GetUserArgs, opts ...pulumi.InvokeOption) (*GetUserResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetUserResult
err := ctx.Invoke("bitbucket:index/getUser:getUser", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getUser.
type GetUserArgs struct {
DisplayName *string `pulumi:"displayName"`
Uuid *string `pulumi:"uuid"`
}
// A collection of values returned by getUser.
type GetUserResult struct {
DisplayName *string `pulumi:"displayName"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Username string `pulumi:"username"`
Uuid *string `pulumi:"uuid"`
}
func GetUserOutput(ctx *pulumi.Context, args GetUserOutputArgs, opts ...pulumi.InvokeOption) GetUserResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (GetUserResult, error) {
args := v.(GetUserArgs)
r, err := GetUser(ctx, &args, opts...)
var s GetUserResult
if r != nil {
s = *r
}
return s, err
}).(GetUserResultOutput)
}
// A collection of arguments for invoking getUser.
type GetUserOutputArgs struct {
DisplayName pulumi.StringPtrInput `pulumi:"displayName"`
Uuid pulumi.StringPtrInput `pulumi:"uuid"`
}
func (GetUserOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetUserArgs)(nil)).Elem()
}
// A collection of values returned by getUser.
type GetUserResultOutput struct{ *pulumi.OutputState }
func (GetUserResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetUserResult)(nil)).Elem()
}
func (o GetUserResultOutput) ToGetUserResultOutput() GetUserResultOutput {
return o
}
func (o GetUserResultOutput) ToGetUserResultOutputWithContext(ctx context.Context) GetUserResultOutput {
return o
}
func (o GetUserResultOutput) ToOutput(ctx context.Context) pulumix.Output[GetUserResult] {
return pulumix.Output[GetUserResult]{
OutputState: o.OutputState,
}
}
func (o GetUserResultOutput) DisplayName() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetUserResult) *string { return v.DisplayName }).(pulumi.StringPtrOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetUserResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetUserResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o GetUserResultOutput) Username() pulumi.StringOutput {
return o.ApplyT(func(v GetUserResult) string { return v.Username }).(pulumi.StringOutput)
}
func (o GetUserResultOutput) Uuid() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetUserResult) *string { return v.Uuid }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterOutputType(GetUserResultOutput{})
}