generated from pulumi/pulumi-provider-boilerplate
/
lookupPineconeCollection.go
115 lines (95 loc) · 4.35 KB
/
lookupPineconeCollection.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
// Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package pinecone
import (
"context"
"reflect"
"github.com/pinecone-io/pulumi-pinecone/sdk/go/pinecone/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// The result of a get operation on a Pinecone collection.
func LookupPineconeCollection(ctx *pulumi.Context, args *LookupPineconeCollectionArgs, opts ...pulumi.InvokeOption) (*LookupPineconeCollectionResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupPineconeCollectionResult
err := ctx.Invoke("pinecone:index:lookupPineconeCollection", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupPineconeCollectionArgs struct {
// The name of the Pinecone collection.
Name string `pulumi:"name"`
}
// The result of a get operation on a Pinecone collection.
type LookupPineconeCollectionResult struct {
// The dimension of the vectors stored in each record held in the collection.
Dimension int `pulumi:"dimension"`
// The environment where the collection is hosted.
Environment string `pulumi:"environment"`
// The name of the collection to be created.
Name string `pulumi:"name"`
// The size of the collection in bytes.
Size int `pulumi:"size"`
// The name of the index to be used as the source for the collection.
Source string `pulumi:"source"`
// The number of records stored in the collection.
VectorCount int `pulumi:"vectorCount"`
}
func LookupPineconeCollectionOutput(ctx *pulumi.Context, args LookupPineconeCollectionOutputArgs, opts ...pulumi.InvokeOption) LookupPineconeCollectionResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupPineconeCollectionResult, error) {
args := v.(LookupPineconeCollectionArgs)
r, err := LookupPineconeCollection(ctx, &args, opts...)
var s LookupPineconeCollectionResult
if r != nil {
s = *r
}
return s, err
}).(LookupPineconeCollectionResultOutput)
}
type LookupPineconeCollectionOutputArgs struct {
// The name of the Pinecone collection.
Name pulumi.StringInput `pulumi:"name"`
}
func (LookupPineconeCollectionOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupPineconeCollectionArgs)(nil)).Elem()
}
// The result of a get operation on a Pinecone collection.
type LookupPineconeCollectionResultOutput struct{ *pulumi.OutputState }
func (LookupPineconeCollectionResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupPineconeCollectionResult)(nil)).Elem()
}
func (o LookupPineconeCollectionResultOutput) ToLookupPineconeCollectionResultOutput() LookupPineconeCollectionResultOutput {
return o
}
func (o LookupPineconeCollectionResultOutput) ToLookupPineconeCollectionResultOutputWithContext(ctx context.Context) LookupPineconeCollectionResultOutput {
return o
}
// The dimension of the vectors stored in each record held in the collection.
func (o LookupPineconeCollectionResultOutput) Dimension() pulumi.IntOutput {
return o.ApplyT(func(v LookupPineconeCollectionResult) int { return v.Dimension }).(pulumi.IntOutput)
}
// The environment where the collection is hosted.
func (o LookupPineconeCollectionResultOutput) Environment() pulumi.StringOutput {
return o.ApplyT(func(v LookupPineconeCollectionResult) string { return v.Environment }).(pulumi.StringOutput)
}
// The name of the collection to be created.
func (o LookupPineconeCollectionResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupPineconeCollectionResult) string { return v.Name }).(pulumi.StringOutput)
}
// The size of the collection in bytes.
func (o LookupPineconeCollectionResultOutput) Size() pulumi.IntOutput {
return o.ApplyT(func(v LookupPineconeCollectionResult) int { return v.Size }).(pulumi.IntOutput)
}
// The name of the index to be used as the source for the collection.
func (o LookupPineconeCollectionResultOutput) Source() pulumi.StringOutput {
return o.ApplyT(func(v LookupPineconeCollectionResult) string { return v.Source }).(pulumi.StringOutput)
}
// The number of records stored in the collection.
func (o LookupPineconeCollectionResultOutput) VectorCount() pulumi.IntOutput {
return o.ApplyT(func(v LookupPineconeCollectionResult) int { return v.VectorCount }).(pulumi.IntOutput)
}
func init() {
pulumi.RegisterOutputType(LookupPineconeCollectionResultOutput{})
}