/
models.go
95 lines (84 loc) · 4.04 KB
/
models.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
// --------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// --------------------------------------------------------------------------------------------
// Generated file, DO NOT EDIT
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// --------------------------------------------------------------------------------------------
package nuget
import (
"github.com/microsoft/azure-devops-go-api/azuredevops"
"github.com/microsoft/azure-devops-go-api/azuredevops/packagingshared"
"github.com/microsoft/azure-devops-go-api/azuredevops/webapi"
)
// Data required to unlist or relist multiple package versions. Pass this while performing NuGetBatchOperationTypes.List batch operation.
type BatchListData struct {
// The desired listed status for the package versions.
Listed *bool `json:"listed,omitempty"`
}
// Describes NuGet batch operation types.
type NuGetBatchOperationType string
type nuGetBatchOperationTypeValuesType struct {
Promote NuGetBatchOperationType
List NuGetBatchOperationType
Delete NuGetBatchOperationType
PermanentDelete NuGetBatchOperationType
RestoreToFeed NuGetBatchOperationType
}
var NuGetBatchOperationTypeValues = nuGetBatchOperationTypeValuesType{
// Promote package versions to a release view. If constructing a NuGetPackagesBatchRequest object with this type, use BatchPromoteData for its Data property. Not supported in the Recycle Bin.
Promote: "promote",
// Unlist or relist package versions. Not supported in the Recycle Bin.
List: "list",
// Move package versions to the feed's Recycle Bin. Not supported in the Recycle Bin.
Delete: "delete",
// Permanently delete package versions. Only supported in the Recycle Bin.
PermanentDelete: "permanentDelete",
// Restore deleted package versions to the feed. Only supported in the Recycle Bin.
RestoreToFeed: "restoreToFeed",
}
// A batch of operations to apply to package versions.
type NuGetPackagesBatchRequest struct {
// Data required to perform the operation. This is optional based on the type of the operation. Use BatchPromoteData if performing a promote operation.
Data interface{} `json:"data,omitempty"`
// Type of operation that needs to be performed on packages.
Operation *NuGetBatchOperationType `json:"operation,omitempty"`
// The packages onto which the operation will be performed.
Packages *[]packagingshared.MinimalPackageDetails `json:"packages,omitempty"`
}
// Deletion state of a NuGet package.
type NuGetPackageVersionDeletionState struct {
// Utc date the package was deleted.
DeletedDate *azuredevops.Time `json:"deletedDate,omitempty"`
// Name of the package.
Name *string `json:"name,omitempty"`
// Version of the package.
Version *string `json:"version,omitempty"`
}
type NuGetRecycleBinPackageVersionDetails struct {
// Setting to false will undo earlier deletion and restore the package to feed.
Deleted *bool `json:"deleted,omitempty"`
}
// Package version metadata for a NuGet package
type Package struct {
// Related REST links.
Links interface{} `json:"_links,omitempty"`
// If and when the package was deleted.
DeletedDate *azuredevops.Time `json:"deletedDate,omitempty"`
// Package Id.
Id *string `json:"id,omitempty"`
// The display name of the package.
Name *string `json:"name,omitempty"`
// If and when the package was permanently deleted.
PermanentlyDeletedDate *azuredevops.Time `json:"permanentlyDeletedDate,omitempty"`
// The history of upstream sources for this package. The first source in the list is the immediate source from which this package was saved.
SourceChain *[]packagingshared.UpstreamSourceInfo `json:"sourceChain,omitempty"`
// The version of the package.
Version *string `json:"version,omitempty"`
}
type PackageVersionDetails struct {
// Indicates the listing state of a package
Listed *bool `json:"listed,omitempty"`
// The view to which the package version will be added
Views *webapi.JsonPatchOperation `json:"views,omitempty"`
}