/
getEngine.go
187 lines (159 loc) · 10.9 KB
/
getEngine.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
// 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 v1alpha
import (
"context"
"reflect"
"github.com/pulumi/pulumi-google-native/sdk/go/google/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Gets a Engine.
func LookupEngine(ctx *pulumi.Context, args *LookupEngineArgs, opts ...pulumi.InvokeOption) (*LookupEngineResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupEngineResult
err := ctx.Invoke("google-native:discoveryengine/v1alpha:getEngine", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupEngineArgs struct {
CollectionId string `pulumi:"collectionId"`
EngineId string `pulumi:"engineId"`
Location string `pulumi:"location"`
Project *string `pulumi:"project"`
}
type LookupEngineResult struct {
// Configurations for the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT.
ChatEngineConfig GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigResponse `pulumi:"chatEngineConfig"`
// Additional information of the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT.
ChatEngineMetadata GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadataResponse `pulumi:"chatEngineMetadata"`
// Common config spec that specifies the metadata of the engine.
CommonConfig GoogleCloudDiscoveryengineV1alphaEngineCommonConfigResponse `pulumi:"commonConfig"`
// Timestamp the Recommendation Engine was created at.
CreateTime string `pulumi:"createTime"`
// The data stores associated with this engine. For SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of engines, they can only associate with at most one data store. If solution_type is SOLUTION_TYPE_CHAT, multiple DataStores in the same Collection can be associated here. Note that when used in CreateEngineRequest, one DataStore id must be provided as the system will use it for necessary intializations.
DataStoreIds []string `pulumi:"dataStoreIds"`
// The display name of the engine. Should be human readable. UTF-8 encoded string with limit of 1024 characters.
DisplayName string `pulumi:"displayName"`
// The industry vertical that the engine registers. The restriction of the Engine industry vertical is based on DataStore: If unspecified, default to `GENERIC`. Vertical on Engine has to match vertical of the DataStore liniked to the engine.
IndustryVertical string `pulumi:"industryVertical"`
// Configurations for the Media Engine. Only applicable on the data stores with solution_type SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA vertical.
MediaRecommendationEngineConfig GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigResponse `pulumi:"mediaRecommendationEngineConfig"`
// Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.
Name string `pulumi:"name"`
// Additional information of a recommendation engine. Only applicable if solution_type is SOLUTION_TYPE_RECOMMENDATION.
RecommendationMetadata GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadataResponse `pulumi:"recommendationMetadata"`
// Configurations for the Search Engine. Only applicable if solution_type is SOLUTION_TYPE_SEARCH.
SearchEngineConfig GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfigResponse `pulumi:"searchEngineConfig"`
// Additional config specs for a `similar-items` engine.
SimilarDocumentsConfig GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfigResponse `pulumi:"similarDocumentsConfig"`
// The solutions of the engine.
SolutionType string `pulumi:"solutionType"`
// Timestamp the Recommendation Engine was last updated.
UpdateTime string `pulumi:"updateTime"`
}
func LookupEngineOutput(ctx *pulumi.Context, args LookupEngineOutputArgs, opts ...pulumi.InvokeOption) LookupEngineResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupEngineResult, error) {
args := v.(LookupEngineArgs)
r, err := LookupEngine(ctx, &args, opts...)
var s LookupEngineResult
if r != nil {
s = *r
}
return s, err
}).(LookupEngineResultOutput)
}
type LookupEngineOutputArgs struct {
CollectionId pulumi.StringInput `pulumi:"collectionId"`
EngineId pulumi.StringInput `pulumi:"engineId"`
Location pulumi.StringInput `pulumi:"location"`
Project pulumi.StringPtrInput `pulumi:"project"`
}
func (LookupEngineOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupEngineArgs)(nil)).Elem()
}
type LookupEngineResultOutput struct{ *pulumi.OutputState }
func (LookupEngineResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupEngineResult)(nil)).Elem()
}
func (o LookupEngineResultOutput) ToLookupEngineResultOutput() LookupEngineResultOutput {
return o
}
func (o LookupEngineResultOutput) ToLookupEngineResultOutputWithContext(ctx context.Context) LookupEngineResultOutput {
return o
}
// Configurations for the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT.
func (o LookupEngineResultOutput) ChatEngineConfig() GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigResponseOutput {
return o.ApplyT(func(v LookupEngineResult) GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigResponse {
return v.ChatEngineConfig
}).(GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigResponseOutput)
}
// Additional information of the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT.
func (o LookupEngineResultOutput) ChatEngineMetadata() GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadataResponseOutput {
return o.ApplyT(func(v LookupEngineResult) GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadataResponse {
return v.ChatEngineMetadata
}).(GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadataResponseOutput)
}
// Common config spec that specifies the metadata of the engine.
func (o LookupEngineResultOutput) CommonConfig() GoogleCloudDiscoveryengineV1alphaEngineCommonConfigResponseOutput {
return o.ApplyT(func(v LookupEngineResult) GoogleCloudDiscoveryengineV1alphaEngineCommonConfigResponse {
return v.CommonConfig
}).(GoogleCloudDiscoveryengineV1alphaEngineCommonConfigResponseOutput)
}
// Timestamp the Recommendation Engine was created at.
func (o LookupEngineResultOutput) CreateTime() pulumi.StringOutput {
return o.ApplyT(func(v LookupEngineResult) string { return v.CreateTime }).(pulumi.StringOutput)
}
// The data stores associated with this engine. For SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of engines, they can only associate with at most one data store. If solution_type is SOLUTION_TYPE_CHAT, multiple DataStores in the same Collection can be associated here. Note that when used in CreateEngineRequest, one DataStore id must be provided as the system will use it for necessary intializations.
func (o LookupEngineResultOutput) DataStoreIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupEngineResult) []string { return v.DataStoreIds }).(pulumi.StringArrayOutput)
}
// The display name of the engine. Should be human readable. UTF-8 encoded string with limit of 1024 characters.
func (o LookupEngineResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v LookupEngineResult) string { return v.DisplayName }).(pulumi.StringOutput)
}
// The industry vertical that the engine registers. The restriction of the Engine industry vertical is based on DataStore: If unspecified, default to `GENERIC`. Vertical on Engine has to match vertical of the DataStore liniked to the engine.
func (o LookupEngineResultOutput) IndustryVertical() pulumi.StringOutput {
return o.ApplyT(func(v LookupEngineResult) string { return v.IndustryVertical }).(pulumi.StringOutput)
}
// Configurations for the Media Engine. Only applicable on the data stores with solution_type SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA vertical.
func (o LookupEngineResultOutput) MediaRecommendationEngineConfig() GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigResponseOutput {
return o.ApplyT(func(v LookupEngineResult) GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigResponse {
return v.MediaRecommendationEngineConfig
}).(GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigResponseOutput)
}
// Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.
func (o LookupEngineResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupEngineResult) string { return v.Name }).(pulumi.StringOutput)
}
// Additional information of a recommendation engine. Only applicable if solution_type is SOLUTION_TYPE_RECOMMENDATION.
func (o LookupEngineResultOutput) RecommendationMetadata() GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadataResponseOutput {
return o.ApplyT(func(v LookupEngineResult) GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadataResponse {
return v.RecommendationMetadata
}).(GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadataResponseOutput)
}
// Configurations for the Search Engine. Only applicable if solution_type is SOLUTION_TYPE_SEARCH.
func (o LookupEngineResultOutput) SearchEngineConfig() GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfigResponseOutput {
return o.ApplyT(func(v LookupEngineResult) GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfigResponse {
return v.SearchEngineConfig
}).(GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfigResponseOutput)
}
// Additional config specs for a `similar-items` engine.
func (o LookupEngineResultOutput) SimilarDocumentsConfig() GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfigResponseOutput {
return o.ApplyT(func(v LookupEngineResult) GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfigResponse {
return v.SimilarDocumentsConfig
}).(GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfigResponseOutput)
}
// The solutions of the engine.
func (o LookupEngineResultOutput) SolutionType() pulumi.StringOutput {
return o.ApplyT(func(v LookupEngineResult) string { return v.SolutionType }).(pulumi.StringOutput)
}
// Timestamp the Recommendation Engine was last updated.
func (o LookupEngineResultOutput) UpdateTime() pulumi.StringOutput {
return o.ApplyT(func(v LookupEngineResult) string { return v.UpdateTime }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupEngineResultOutput{})
}