-
Notifications
You must be signed in to change notification settings - Fork 276
/
Copy pathversion_meta_data.go
493 lines (456 loc) · 15 KB
/
version_meta_data.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
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time"
)
type VersionMetaData struct {
// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
additionalData map[string]any
// The ID of a single artifact.
artifactId *string
// The artifactType property
artifactType *string
// The contentId property
contentId *int64
// The createdOn property
createdOn *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time
// The description property
description *string
// The globalId property
globalId *int64
// An ID of a single artifact group.
groupId *string
// User-defined name-value pairs. Name and value must be strings.
labels Labelsable
// The modifiedBy property
modifiedBy *string
// The modifiedOn property
modifiedOn *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time
// The name property
name *string
// The owner property
owner *string
// Describes the state of an artifact or artifact version. The following statesare possible:* ENABLED* DISABLED* DEPRECATED
state *VersionState
// A single version of an artifact. Can be provided by the client when creating a new version,or it can be server-generated. The value can be any string unique to the artifact, but it isrecommended to use a simple integer or a semver value.
version *string
}
// NewVersionMetaData instantiates a new VersionMetaData and sets the default values.
func NewVersionMetaData() *VersionMetaData {
m := &VersionMetaData{}
m.SetAdditionalData(make(map[string]any))
return m
}
// CreateVersionMetaDataFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
// returns a Parsable when successful
func CreateVersionMetaDataFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewVersionMetaData(), nil
}
// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
// returns a map[string]any when successful
func (m *VersionMetaData) GetAdditionalData() map[string]any {
return m.additionalData
}
// GetArtifactId gets the artifactId property value. The ID of a single artifact.
// returns a *string when successful
func (m *VersionMetaData) GetArtifactId() *string {
return m.artifactId
}
// GetArtifactType gets the artifactType property value. The artifactType property
// returns a *string when successful
func (m *VersionMetaData) GetArtifactType() *string {
return m.artifactType
}
// GetContentId gets the contentId property value. The contentId property
// returns a *int64 when successful
func (m *VersionMetaData) GetContentId() *int64 {
return m.contentId
}
// GetCreatedOn gets the createdOn property value. The createdOn property
// returns a *Time when successful
func (m *VersionMetaData) GetCreatedOn() *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time {
return m.createdOn
}
// GetDescription gets the description property value. The description property
// returns a *string when successful
func (m *VersionMetaData) GetDescription() *string {
return m.description
}
// GetFieldDeserializers the deserialization information for the current model
// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful
func (m *VersionMetaData) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error)
res["artifactId"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetArtifactId(val)
}
return nil
}
res["artifactType"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetArtifactType(val)
}
return nil
}
res["contentId"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetInt64Value()
if err != nil {
return err
}
if val != nil {
m.SetContentId(val)
}
return nil
}
res["createdOn"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetTimeValue()
if err != nil {
return err
}
if val != nil {
m.SetCreatedOn(val)
}
return nil
}
res["description"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetDescription(val)
}
return nil
}
res["globalId"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetInt64Value()
if err != nil {
return err
}
if val != nil {
m.SetGlobalId(val)
}
return nil
}
res["groupId"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetGroupId(val)
}
return nil
}
res["labels"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(CreateLabelsFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetLabels(val.(Labelsable))
}
return nil
}
res["modifiedBy"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetModifiedBy(val)
}
return nil
}
res["modifiedOn"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetTimeValue()
if err != nil {
return err
}
if val != nil {
m.SetModifiedOn(val)
}
return nil
}
res["name"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetName(val)
}
return nil
}
res["owner"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetOwner(val)
}
return nil
}
res["state"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetEnumValue(ParseVersionState)
if err != nil {
return err
}
if val != nil {
m.SetState(val.(*VersionState))
}
return nil
}
res["version"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetVersion(val)
}
return nil
}
return res
}
// GetGlobalId gets the globalId property value. The globalId property
// returns a *int64 when successful
func (m *VersionMetaData) GetGlobalId() *int64 {
return m.globalId
}
// GetGroupId gets the groupId property value. An ID of a single artifact group.
// returns a *string when successful
func (m *VersionMetaData) GetGroupId() *string {
return m.groupId
}
// GetLabels gets the labels property value. User-defined name-value pairs. Name and value must be strings.
// returns a Labelsable when successful
func (m *VersionMetaData) GetLabels() Labelsable {
return m.labels
}
// GetModifiedBy gets the modifiedBy property value. The modifiedBy property
// returns a *string when successful
func (m *VersionMetaData) GetModifiedBy() *string {
return m.modifiedBy
}
// GetModifiedOn gets the modifiedOn property value. The modifiedOn property
// returns a *Time when successful
func (m *VersionMetaData) GetModifiedOn() *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time {
return m.modifiedOn
}
// GetName gets the name property value. The name property
// returns a *string when successful
func (m *VersionMetaData) GetName() *string {
return m.name
}
// GetOwner gets the owner property value. The owner property
// returns a *string when successful
func (m *VersionMetaData) GetOwner() *string {
return m.owner
}
// GetState gets the state property value. Describes the state of an artifact or artifact version. The following statesare possible:* ENABLED* DISABLED* DEPRECATED
// returns a *VersionState when successful
func (m *VersionMetaData) GetState() *VersionState {
return m.state
}
// GetVersion gets the version property value. A single version of an artifact. Can be provided by the client when creating a new version,or it can be server-generated. The value can be any string unique to the artifact, but it isrecommended to use a simple integer or a semver value.
// returns a *string when successful
func (m *VersionMetaData) GetVersion() *string {
return m.version
}
// Serialize serializes information the current object
func (m *VersionMetaData) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error {
{
err := writer.WriteStringValue("artifactId", m.GetArtifactId())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("artifactType", m.GetArtifactType())
if err != nil {
return err
}
}
{
err := writer.WriteInt64Value("contentId", m.GetContentId())
if err != nil {
return err
}
}
{
err := writer.WriteTimeValue("createdOn", m.GetCreatedOn())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("description", m.GetDescription())
if err != nil {
return err
}
}
{
err := writer.WriteInt64Value("globalId", m.GetGlobalId())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("groupId", m.GetGroupId())
if err != nil {
return err
}
}
{
err := writer.WriteObjectValue("labels", m.GetLabels())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("modifiedBy", m.GetModifiedBy())
if err != nil {
return err
}
}
{
err := writer.WriteTimeValue("modifiedOn", m.GetModifiedOn())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("name", m.GetName())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("owner", m.GetOwner())
if err != nil {
return err
}
}
if m.GetState() != nil {
cast := (*m.GetState()).String()
err := writer.WriteStringValue("state", &cast)
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("version", m.GetVersion())
if err != nil {
return err
}
}
{
err := writer.WriteAdditionalData(m.GetAdditionalData())
if err != nil {
return err
}
}
return nil
}
// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
func (m *VersionMetaData) SetAdditionalData(value map[string]any) {
m.additionalData = value
}
// SetArtifactId sets the artifactId property value. The ID of a single artifact.
func (m *VersionMetaData) SetArtifactId(value *string) {
m.artifactId = value
}
// SetArtifactType sets the artifactType property value. The artifactType property
func (m *VersionMetaData) SetArtifactType(value *string) {
m.artifactType = value
}
// SetContentId sets the contentId property value. The contentId property
func (m *VersionMetaData) SetContentId(value *int64) {
m.contentId = value
}
// SetCreatedOn sets the createdOn property value. The createdOn property
func (m *VersionMetaData) SetCreatedOn(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) {
m.createdOn = value
}
// SetDescription sets the description property value. The description property
func (m *VersionMetaData) SetDescription(value *string) {
m.description = value
}
// SetGlobalId sets the globalId property value. The globalId property
func (m *VersionMetaData) SetGlobalId(value *int64) {
m.globalId = value
}
// SetGroupId sets the groupId property value. An ID of a single artifact group.
func (m *VersionMetaData) SetGroupId(value *string) {
m.groupId = value
}
// SetLabels sets the labels property value. User-defined name-value pairs. Name and value must be strings.
func (m *VersionMetaData) SetLabels(value Labelsable) {
m.labels = value
}
// SetModifiedBy sets the modifiedBy property value. The modifiedBy property
func (m *VersionMetaData) SetModifiedBy(value *string) {
m.modifiedBy = value
}
// SetModifiedOn sets the modifiedOn property value. The modifiedOn property
func (m *VersionMetaData) SetModifiedOn(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) {
m.modifiedOn = value
}
// SetName sets the name property value. The name property
func (m *VersionMetaData) SetName(value *string) {
m.name = value
}
// SetOwner sets the owner property value. The owner property
func (m *VersionMetaData) SetOwner(value *string) {
m.owner = value
}
// SetState sets the state property value. Describes the state of an artifact or artifact version. The following statesare possible:* ENABLED* DISABLED* DEPRECATED
func (m *VersionMetaData) SetState(value *VersionState) {
m.state = value
}
// SetVersion sets the version property value. A single version of an artifact. Can be provided by the client when creating a new version,or it can be server-generated. The value can be any string unique to the artifact, but it isrecommended to use a simple integer or a semver value.
func (m *VersionMetaData) SetVersion(value *string) {
m.version = value
}
type VersionMetaDataable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetArtifactId() *string
GetArtifactType() *string
GetContentId() *int64
GetCreatedOn() *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time
GetDescription() *string
GetGlobalId() *int64
GetGroupId() *string
GetLabels() Labelsable
GetModifiedBy() *string
GetModifiedOn() *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time
GetName() *string
GetOwner() *string
GetState() *VersionState
GetVersion() *string
SetArtifactId(value *string)
SetArtifactType(value *string)
SetContentId(value *int64)
SetCreatedOn(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)
SetDescription(value *string)
SetGlobalId(value *int64)
SetGroupId(value *string)
SetLabels(value Labelsable)
SetModifiedBy(value *string)
SetModifiedOn(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)
SetName(value *string)
SetOwner(value *string)
SetState(value *VersionState)
SetVersion(value *string)
}