/
getReport.go
133 lines (111 loc) · 4.4 KB
/
getReport.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
// 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 v1alpha1
import (
"context"
"reflect"
"github.com/pulumi/pulumi-google-native/sdk/go/google/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Gets details of a single Report.
func LookupReport(ctx *pulumi.Context, args *LookupReportArgs, opts ...pulumi.InvokeOption) (*LookupReportResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupReportResult
err := ctx.Invoke("google-native:migrationcenter/v1alpha1:getReport", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupReportArgs struct {
Location string `pulumi:"location"`
Project *string `pulumi:"project"`
ReportConfigId string `pulumi:"reportConfigId"`
ReportId string `pulumi:"reportId"`
View *string `pulumi:"view"`
}
type LookupReportResult struct {
// Creation timestamp.
CreateTime string `pulumi:"createTime"`
// Free-text description.
Description string `pulumi:"description"`
// User-friendly display name. Maximum length is 63 characters.
DisplayName string `pulumi:"displayName"`
// Name of resource.
Name string `pulumi:"name"`
// Report creation state.
State string `pulumi:"state"`
// Summary view of the Report.
Summary ReportSummaryResponse `pulumi:"summary"`
// Report type.
Type string `pulumi:"type"`
// Last update timestamp.
UpdateTime string `pulumi:"updateTime"`
}
func LookupReportOutput(ctx *pulumi.Context, args LookupReportOutputArgs, opts ...pulumi.InvokeOption) LookupReportResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupReportResult, error) {
args := v.(LookupReportArgs)
r, err := LookupReport(ctx, &args, opts...)
var s LookupReportResult
if r != nil {
s = *r
}
return s, err
}).(LookupReportResultOutput)
}
type LookupReportOutputArgs struct {
Location pulumi.StringInput `pulumi:"location"`
Project pulumi.StringPtrInput `pulumi:"project"`
ReportConfigId pulumi.StringInput `pulumi:"reportConfigId"`
ReportId pulumi.StringInput `pulumi:"reportId"`
View pulumi.StringPtrInput `pulumi:"view"`
}
func (LookupReportOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupReportArgs)(nil)).Elem()
}
type LookupReportResultOutput struct{ *pulumi.OutputState }
func (LookupReportResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupReportResult)(nil)).Elem()
}
func (o LookupReportResultOutput) ToLookupReportResultOutput() LookupReportResultOutput {
return o
}
func (o LookupReportResultOutput) ToLookupReportResultOutputWithContext(ctx context.Context) LookupReportResultOutput {
return o
}
// Creation timestamp.
func (o LookupReportResultOutput) CreateTime() pulumi.StringOutput {
return o.ApplyT(func(v LookupReportResult) string { return v.CreateTime }).(pulumi.StringOutput)
}
// Free-text description.
func (o LookupReportResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupReportResult) string { return v.Description }).(pulumi.StringOutput)
}
// User-friendly display name. Maximum length is 63 characters.
func (o LookupReportResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v LookupReportResult) string { return v.DisplayName }).(pulumi.StringOutput)
}
// Name of resource.
func (o LookupReportResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupReportResult) string { return v.Name }).(pulumi.StringOutput)
}
// Report creation state.
func (o LookupReportResultOutput) State() pulumi.StringOutput {
return o.ApplyT(func(v LookupReportResult) string { return v.State }).(pulumi.StringOutput)
}
// Summary view of the Report.
func (o LookupReportResultOutput) Summary() ReportSummaryResponseOutput {
return o.ApplyT(func(v LookupReportResult) ReportSummaryResponse { return v.Summary }).(ReportSummaryResponseOutput)
}
// Report type.
func (o LookupReportResultOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v LookupReportResult) string { return v.Type }).(pulumi.StringOutput)
}
// Last update timestamp.
func (o LookupReportResultOutput) UpdateTime() pulumi.StringOutput {
return o.ApplyT(func(v LookupReportResult) string { return v.UpdateTime }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupReportResultOutput{})
}