/
timeSeries.go
273 lines (233 loc) · 11.8 KB
/
timeSeries.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
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
// 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 TensorboardTimeSeries.
// Auto-naming is currently not supported for this resource.
type TimeSeries struct {
pulumi.CustomResourceState
// Timestamp when this TensorboardTimeSeries was created.
CreateTime pulumi.StringOutput `pulumi:"createTime"`
// Description of this TensorboardTimeSeries.
Description pulumi.StringOutput `pulumi:"description"`
// User provided name of this TensorboardTimeSeries. This value should be unique among all TensorboardTimeSeries resources belonging to the same TensorboardRun resource (parent resource).
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// Used to perform a consistent read-modify-write updates. If not set, a blind "overwrite" update happens.
Etag pulumi.StringOutput `pulumi:"etag"`
ExperimentId pulumi.StringOutput `pulumi:"experimentId"`
Location pulumi.StringOutput `pulumi:"location"`
// Scalar, Tensor, or Blob metadata for this TensorboardTimeSeries.
Metadata GoogleCloudAiplatformV1beta1TensorboardTimeSeriesMetadataResponseOutput `pulumi:"metadata"`
// Name of the TensorboardTimeSeries.
Name pulumi.StringOutput `pulumi:"name"`
// Data of the current plugin, with the size limited to 65KB.
PluginData pulumi.StringOutput `pulumi:"pluginData"`
// Immutable. Name of the plugin this time series pertain to. Such as Scalar, Tensor, Blob
PluginName pulumi.StringOutput `pulumi:"pluginName"`
Project pulumi.StringOutput `pulumi:"project"`
RunId pulumi.StringOutput `pulumi:"runId"`
TensorboardId pulumi.StringOutput `pulumi:"tensorboardId"`
// Optional. The user specified unique ID to use for the TensorboardTimeSeries, which becomes the final component of the TensorboardTimeSeries's resource name. This value should match "a-z0-9{0, 127}"
TensorboardTimeSeriesId pulumi.StringPtrOutput `pulumi:"tensorboardTimeSeriesId"`
// Timestamp when this TensorboardTimeSeries was last updated.
UpdateTime pulumi.StringOutput `pulumi:"updateTime"`
// Immutable. Type of TensorboardTimeSeries value.
ValueType pulumi.StringOutput `pulumi:"valueType"`
}
// NewTimeSeries registers a new resource with the given unique name, arguments, and options.
func NewTimeSeries(ctx *pulumi.Context,
name string, args *TimeSeriesArgs, opts ...pulumi.ResourceOption) (*TimeSeries, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DisplayName == nil {
return nil, errors.New("invalid value for required argument 'DisplayName'")
}
if args.ExperimentId == nil {
return nil, errors.New("invalid value for required argument 'ExperimentId'")
}
if args.RunId == nil {
return nil, errors.New("invalid value for required argument 'RunId'")
}
if args.TensorboardId == nil {
return nil, errors.New("invalid value for required argument 'TensorboardId'")
}
if args.ValueType == nil {
return nil, errors.New("invalid value for required argument 'ValueType'")
}
replaceOnChanges := pulumi.ReplaceOnChanges([]string{
"experimentId",
"location",
"project",
"runId",
"tensorboardId",
})
opts = append(opts, replaceOnChanges)
opts = internal.PkgResourceDefaultOpts(opts)
var resource TimeSeries
err := ctx.RegisterResource("google-native:aiplatform/v1beta1:TimeSeries", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetTimeSeries gets an existing TimeSeries 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 GetTimeSeries(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *TimeSeriesState, opts ...pulumi.ResourceOption) (*TimeSeries, error) {
var resource TimeSeries
err := ctx.ReadResource("google-native:aiplatform/v1beta1:TimeSeries", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering TimeSeries resources.
type timeSeriesState struct {
}
type TimeSeriesState struct {
}
func (TimeSeriesState) ElementType() reflect.Type {
return reflect.TypeOf((*timeSeriesState)(nil)).Elem()
}
type timeSeriesArgs struct {
// Description of this TensorboardTimeSeries.
Description *string `pulumi:"description"`
// User provided name of this TensorboardTimeSeries. This value should be unique among all TensorboardTimeSeries resources belonging to the same TensorboardRun resource (parent resource).
DisplayName string `pulumi:"displayName"`
// Used to perform a consistent read-modify-write updates. If not set, a blind "overwrite" update happens.
Etag *string `pulumi:"etag"`
ExperimentId string `pulumi:"experimentId"`
Location *string `pulumi:"location"`
// Data of the current plugin, with the size limited to 65KB.
PluginData *string `pulumi:"pluginData"`
// Immutable. Name of the plugin this time series pertain to. Such as Scalar, Tensor, Blob
PluginName *string `pulumi:"pluginName"`
Project *string `pulumi:"project"`
RunId string `pulumi:"runId"`
TensorboardId string `pulumi:"tensorboardId"`
// Optional. The user specified unique ID to use for the TensorboardTimeSeries, which becomes the final component of the TensorboardTimeSeries's resource name. This value should match "a-z0-9{0, 127}"
TensorboardTimeSeriesId *string `pulumi:"tensorboardTimeSeriesId"`
// Immutable. Type of TensorboardTimeSeries value.
ValueType TimeSeriesValueType `pulumi:"valueType"`
}
// The set of arguments for constructing a TimeSeries resource.
type TimeSeriesArgs struct {
// Description of this TensorboardTimeSeries.
Description pulumi.StringPtrInput
// User provided name of this TensorboardTimeSeries. This value should be unique among all TensorboardTimeSeries resources belonging to the same TensorboardRun resource (parent resource).
DisplayName pulumi.StringInput
// Used to perform a consistent read-modify-write updates. If not set, a blind "overwrite" update happens.
Etag pulumi.StringPtrInput
ExperimentId pulumi.StringInput
Location pulumi.StringPtrInput
// Data of the current plugin, with the size limited to 65KB.
PluginData pulumi.StringPtrInput
// Immutable. Name of the plugin this time series pertain to. Such as Scalar, Tensor, Blob
PluginName pulumi.StringPtrInput
Project pulumi.StringPtrInput
RunId pulumi.StringInput
TensorboardId pulumi.StringInput
// Optional. The user specified unique ID to use for the TensorboardTimeSeries, which becomes the final component of the TensorboardTimeSeries's resource name. This value should match "a-z0-9{0, 127}"
TensorboardTimeSeriesId pulumi.StringPtrInput
// Immutable. Type of TensorboardTimeSeries value.
ValueType TimeSeriesValueTypeInput
}
func (TimeSeriesArgs) ElementType() reflect.Type {
return reflect.TypeOf((*timeSeriesArgs)(nil)).Elem()
}
type TimeSeriesInput interface {
pulumi.Input
ToTimeSeriesOutput() TimeSeriesOutput
ToTimeSeriesOutputWithContext(ctx context.Context) TimeSeriesOutput
}
func (*TimeSeries) ElementType() reflect.Type {
return reflect.TypeOf((**TimeSeries)(nil)).Elem()
}
func (i *TimeSeries) ToTimeSeriesOutput() TimeSeriesOutput {
return i.ToTimeSeriesOutputWithContext(context.Background())
}
func (i *TimeSeries) ToTimeSeriesOutputWithContext(ctx context.Context) TimeSeriesOutput {
return pulumi.ToOutputWithContext(ctx, i).(TimeSeriesOutput)
}
type TimeSeriesOutput struct{ *pulumi.OutputState }
func (TimeSeriesOutput) ElementType() reflect.Type {
return reflect.TypeOf((**TimeSeries)(nil)).Elem()
}
func (o TimeSeriesOutput) ToTimeSeriesOutput() TimeSeriesOutput {
return o
}
func (o TimeSeriesOutput) ToTimeSeriesOutputWithContext(ctx context.Context) TimeSeriesOutput {
return o
}
// Timestamp when this TensorboardTimeSeries was created.
func (o TimeSeriesOutput) CreateTime() pulumi.StringOutput {
return o.ApplyT(func(v *TimeSeries) pulumi.StringOutput { return v.CreateTime }).(pulumi.StringOutput)
}
// Description of this TensorboardTimeSeries.
func (o TimeSeriesOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v *TimeSeries) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput)
}
// User provided name of this TensorboardTimeSeries. This value should be unique among all TensorboardTimeSeries resources belonging to the same TensorboardRun resource (parent resource).
func (o TimeSeriesOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *TimeSeries) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// Used to perform a consistent read-modify-write updates. If not set, a blind "overwrite" update happens.
func (o TimeSeriesOutput) Etag() pulumi.StringOutput {
return o.ApplyT(func(v *TimeSeries) pulumi.StringOutput { return v.Etag }).(pulumi.StringOutput)
}
func (o TimeSeriesOutput) ExperimentId() pulumi.StringOutput {
return o.ApplyT(func(v *TimeSeries) pulumi.StringOutput { return v.ExperimentId }).(pulumi.StringOutput)
}
func (o TimeSeriesOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *TimeSeries) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Scalar, Tensor, or Blob metadata for this TensorboardTimeSeries.
func (o TimeSeriesOutput) Metadata() GoogleCloudAiplatformV1beta1TensorboardTimeSeriesMetadataResponseOutput {
return o.ApplyT(func(v *TimeSeries) GoogleCloudAiplatformV1beta1TensorboardTimeSeriesMetadataResponseOutput {
return v.Metadata
}).(GoogleCloudAiplatformV1beta1TensorboardTimeSeriesMetadataResponseOutput)
}
// Name of the TensorboardTimeSeries.
func (o TimeSeriesOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *TimeSeries) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Data of the current plugin, with the size limited to 65KB.
func (o TimeSeriesOutput) PluginData() pulumi.StringOutput {
return o.ApplyT(func(v *TimeSeries) pulumi.StringOutput { return v.PluginData }).(pulumi.StringOutput)
}
// Immutable. Name of the plugin this time series pertain to. Such as Scalar, Tensor, Blob
func (o TimeSeriesOutput) PluginName() pulumi.StringOutput {
return o.ApplyT(func(v *TimeSeries) pulumi.StringOutput { return v.PluginName }).(pulumi.StringOutput)
}
func (o TimeSeriesOutput) Project() pulumi.StringOutput {
return o.ApplyT(func(v *TimeSeries) pulumi.StringOutput { return v.Project }).(pulumi.StringOutput)
}
func (o TimeSeriesOutput) RunId() pulumi.StringOutput {
return o.ApplyT(func(v *TimeSeries) pulumi.StringOutput { return v.RunId }).(pulumi.StringOutput)
}
func (o TimeSeriesOutput) TensorboardId() pulumi.StringOutput {
return o.ApplyT(func(v *TimeSeries) pulumi.StringOutput { return v.TensorboardId }).(pulumi.StringOutput)
}
// Optional. The user specified unique ID to use for the TensorboardTimeSeries, which becomes the final component of the TensorboardTimeSeries's resource name. This value should match "a-z0-9{0, 127}"
func (o TimeSeriesOutput) TensorboardTimeSeriesId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *TimeSeries) pulumi.StringPtrOutput { return v.TensorboardTimeSeriesId }).(pulumi.StringPtrOutput)
}
// Timestamp when this TensorboardTimeSeries was last updated.
func (o TimeSeriesOutput) UpdateTime() pulumi.StringOutput {
return o.ApplyT(func(v *TimeSeries) pulumi.StringOutput { return v.UpdateTime }).(pulumi.StringOutput)
}
// Immutable. Type of TensorboardTimeSeries value.
func (o TimeSeriesOutput) ValueType() pulumi.StringOutput {
return o.ApplyT(func(v *TimeSeries) pulumi.StringOutput { return v.ValueType }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*TimeSeriesInput)(nil)).Elem(), &TimeSeries{})
pulumi.RegisterOutputType(TimeSeriesOutput{})
}