-
Notifications
You must be signed in to change notification settings - Fork 74
/
models.go
483 lines (432 loc) · 16.2 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
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
// --------------------------------------------------------------------------------------------
// 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 core
import (
"github.com/google/uuid"
"github.com/microsoft/azure-devops-go-api/azuredevops"
"github.com/microsoft/azure-devops-go-api/azuredevops/identity"
"github.com/microsoft/azure-devops-go-api/azuredevops/webapi"
)
type ConnectedServiceKind string
type connectedServiceKindValuesType struct {
Custom ConnectedServiceKind
AzureSubscription ConnectedServiceKind
Chef ConnectedServiceKind
Generic ConnectedServiceKind
}
var ConnectedServiceKindValues = connectedServiceKindValuesType{
// Custom or unknown service
Custom: "custom",
// Azure Subscription
AzureSubscription: "azureSubscription",
// Chef Connection
Chef: "chef",
// Generic Connection
Generic: "generic",
}
type IdentityData struct {
IdentityIds *[]uuid.UUID `json:"identityIds,omitempty"`
}
type Process struct {
Name *string `json:"name,omitempty"`
Url *string `json:"url,omitempty"`
Links interface{} `json:"_links,omitempty"`
Description *string `json:"description,omitempty"`
Id *uuid.UUID `json:"id,omitempty"`
IsDefault *bool `json:"isDefault,omitempty"`
Type *ProcessType `json:"type,omitempty"`
}
// Type of process customization on a collection.
type ProcessCustomizationType string
type processCustomizationTypeValuesType struct {
Xml ProcessCustomizationType
Inherited ProcessCustomizationType
}
var ProcessCustomizationTypeValues = processCustomizationTypeValuesType{
// Customization based on project-scoped xml customization
Xml: "xml",
// Customization based on process inheritance
Inherited: "inherited",
}
type ProcessReference struct {
Name *string `json:"name,omitempty"`
Url *string `json:"url,omitempty"`
}
type ProcessType string
type processTypeValuesType struct {
System ProcessType
Custom ProcessType
Inherited ProcessType
}
var ProcessTypeValues = processTypeValuesType{
System: "system",
Custom: "custom",
Inherited: "inherited",
}
// Contains the image data for project avatar.
type ProjectAvatar struct {
// The avatar image represented as a byte array.
Image *[]byte `json:"image,omitempty"`
}
type ProjectChangeType string
type projectChangeTypeValuesType struct {
Modified ProjectChangeType
Deleted ProjectChangeType
Added ProjectChangeType
}
var ProjectChangeTypeValues = projectChangeTypeValuesType{
Modified: "modified",
Deleted: "deleted",
Added: "added",
}
// Contains information describing a project.
type ProjectInfo struct {
// The abbreviated name of the project.
Abbreviation *string `json:"abbreviation,omitempty"`
// The description of the project.
Description *string `json:"description,omitempty"`
// The id of the project.
Id *uuid.UUID `json:"id,omitempty"`
// The time that this project was last updated.
LastUpdateTime *azuredevops.Time `json:"lastUpdateTime,omitempty"`
// The name of the project.
Name *string `json:"name,omitempty"`
// A set of name-value pairs storing additional property data related to the project.
Properties *[]ProjectProperty `json:"properties,omitempty"`
// The current revision of the project.
Revision *uint64 `json:"revision,omitempty"`
// The current state of the project.
State *ProjectState `json:"state,omitempty"`
// A Uri that can be used to refer to this project.
Uri *string `json:"uri,omitempty"`
// The version number of the project.
Version *uint64 `json:"version,omitempty"`
// Indicates whom the project is visible to.
Visibility *ProjectVisibility `json:"visibility,omitempty"`
}
type ProjectMessage struct {
Project *ProjectInfo `json:"project,omitempty"`
ProjectChangeType *ProjectChangeType `json:"projectChangeType,omitempty"`
ShouldInvalidateSystemStore *bool `json:"shouldInvalidateSystemStore,omitempty"`
}
type ProjectProperties struct {
// The team project Id
ProjectId *uuid.UUID `json:"projectId,omitempty"`
// The collection of team project properties
Properties *[]ProjectProperty `json:"properties,omitempty"`
}
// A named value associated with a project.
type ProjectProperty struct {
// The name of the property.
Name *string `json:"name,omitempty"`
// The value of the property.
Value interface{} `json:"value,omitempty"`
}
type ProjectState string
type projectStateValuesType struct {
Deleting ProjectState
New ProjectState
WellFormed ProjectState
CreatePending ProjectState
All ProjectState
Unchanged ProjectState
Deleted ProjectState
}
var ProjectStateValues = projectStateValuesType{
// Project is in the process of being deleted.
Deleting: "deleting",
// Project is in the process of being created.
New: "new",
// Project is completely created and ready to use.
WellFormed: "wellFormed",
// Project has been queued for creation, but the process has not yet started.
CreatePending: "createPending",
// All projects regardless of state.
All: "all",
// Project has not been changed.
Unchanged: "unchanged",
// Project has been deleted.
Deleted: "deleted",
}
type ProjectVisibility string
type projectVisibilityValuesType struct {
Private ProjectVisibility
Public ProjectVisibility
}
var ProjectVisibilityValues = projectVisibilityValuesType{
// The project is only visible to users with explicit access.
Private: "private",
// The project is visible to all.
Public: "public",
}
type Proxy struct {
Authorization *ProxyAuthorization `json:"authorization,omitempty"`
// This is a description string
Description *string `json:"description,omitempty"`
// The friendly name of the server
FriendlyName *string `json:"friendlyName,omitempty"`
GlobalDefault *bool `json:"globalDefault,omitempty"`
// This is a string representation of the site that the proxy server is located in (e.g. "NA-WA-RED")
Site *string `json:"site,omitempty"`
SiteDefault *bool `json:"siteDefault,omitempty"`
// The URL of the proxy server
Url *string `json:"url,omitempty"`
}
type ProxyAuthorization struct {
// Gets or sets the endpoint used to obtain access tokens from the configured token service.
AuthorizationUrl *string `json:"authorizationUrl,omitempty"`
// Gets or sets the client identifier for this proxy.
ClientId *uuid.UUID `json:"clientId,omitempty"`
// Gets or sets the user identity to authorize for on-prem.
Identity *string `json:"identity,omitempty"`
// Gets or sets the public key used to verify the identity of this proxy. Only specify on hosted.
PublicKey *webapi.PublicKey `json:"publicKey,omitempty"`
}
type SourceControlTypes string
type sourceControlTypesValuesType struct {
Tfvc SourceControlTypes
Git SourceControlTypes
}
var SourceControlTypesValues = sourceControlTypesValuesType{
Tfvc: "tfvc",
Git: "git",
}
// The Team Context for an operation.
type TeamContext struct {
// The team project Id or name. Ignored if ProjectId is set.
Project *string `json:"project,omitempty"`
// The Team Project ID. Required if Project is not set.
ProjectId *uuid.UUID `json:"projectId,omitempty"`
// The Team Id or name. Ignored if TeamId is set.
Team *string `json:"team,omitempty"`
// The Team Id
TeamId *uuid.UUID `json:"teamId,omitempty"`
}
// Represents a Team Project object.
type TeamProject struct {
// Project abbreviation.
Abbreviation *string `json:"abbreviation,omitempty"`
// Url to default team identity image.
DefaultTeamImageUrl *string `json:"defaultTeamImageUrl,omitempty"`
// The project's description (if any).
Description *string `json:"description,omitempty"`
// Project identifier.
Id *uuid.UUID `json:"id,omitempty"`
// Project last update time.
LastUpdateTime *azuredevops.Time `json:"lastUpdateTime,omitempty"`
// Project name.
Name *string `json:"name,omitempty"`
// Project revision.
Revision *uint64 `json:"revision,omitempty"`
// Project state.
State *ProjectState `json:"state,omitempty"`
// Url to the full version of the object.
Url *string `json:"url,omitempty"`
// Project visibility.
Visibility *ProjectVisibility `json:"visibility,omitempty"`
// The links to other objects related to this object.
Links interface{} `json:"_links,omitempty"`
// Set of capabilities this project has (such as process template & version control).
Capabilities *map[string]map[string]string `json:"capabilities,omitempty"`
// The shallow ref to the default team.
DefaultTeam *WebApiTeamRef `json:"defaultTeam,omitempty"`
}
// Data contract for a TeamProjectCollection.
type TeamProjectCollection struct {
// Collection Id.
Id *uuid.UUID `json:"id,omitempty"`
// Collection Name.
Name *string `json:"name,omitempty"`
// Collection REST Url.
Url *string `json:"url,omitempty"`
// The links to other objects related to this object.
Links interface{} `json:"_links,omitempty"`
// Project collection description.
Description *string `json:"description,omitempty"`
// Process customization type on this collection. It can be Xml or Inherited.
ProcessCustomizationType *ProcessCustomizationType `json:"processCustomizationType,omitempty"`
// Project collection state.
State *string `json:"state,omitempty"`
}
// Reference object for a TeamProjectCollection.
type TeamProjectCollectionReference struct {
// Collection Id.
Id *uuid.UUID `json:"id,omitempty"`
// Collection Name.
Name *string `json:"name,omitempty"`
// Collection REST Url.
Url *string `json:"url,omitempty"`
}
// Represents a shallow reference to a TeamProject.
type TeamProjectReference struct {
// Project abbreviation.
Abbreviation *string `json:"abbreviation,omitempty"`
// Url to default team identity image.
DefaultTeamImageUrl *string `json:"defaultTeamImageUrl,omitempty"`
// The project's description (if any).
Description *string `json:"description,omitempty"`
// Project identifier.
Id *uuid.UUID `json:"id,omitempty"`
// Project last update time.
LastUpdateTime *azuredevops.Time `json:"lastUpdateTime,omitempty"`
// Project name.
Name *string `json:"name,omitempty"`
// Project revision.
Revision *uint64 `json:"revision,omitempty"`
// Project state.
State *ProjectState `json:"state,omitempty"`
// Url to the full version of the object.
Url *string `json:"url,omitempty"`
// Project visibility.
Visibility *ProjectVisibility `json:"visibility,omitempty"`
}
// A data transfer object that stores the metadata associated with the creation of temporary data.
type TemporaryDataCreatedDTO struct {
ExpirationSeconds *int `json:"expirationSeconds,omitempty"`
Origin *string `json:"origin,omitempty"`
Value interface{} `json:"value,omitempty"`
ExpirationDate *azuredevops.Time `json:"expirationDate,omitempty"`
Id *uuid.UUID `json:"id,omitempty"`
Url *string `json:"url,omitempty"`
}
// A data transfer object that stores the metadata associated with the temporary data.
type TemporaryDataDTO struct {
ExpirationSeconds *int `json:"expirationSeconds,omitempty"`
Origin *string `json:"origin,omitempty"`
Value interface{} `json:"value,omitempty"`
}
// Updateable properties for a WebApiTeam.
type UpdateTeam struct {
// New description for the team.
Description *string `json:"description,omitempty"`
// New name for the team.
Name *string `json:"name,omitempty"`
}
type WebApiConnectedService struct {
Url *string `json:"url,omitempty"`
// The user who did the OAuth authentication to created this service
AuthenticatedBy *webapi.IdentityRef `json:"authenticatedBy,omitempty"`
// Extra description on the service.
Description *string `json:"description,omitempty"`
// Friendly Name of service connection
FriendlyName *string `json:"friendlyName,omitempty"`
// Id/Name of the connection service. For Ex: Subscription Id for Azure Connection
Id *string `json:"id,omitempty"`
// The kind of service.
Kind *string `json:"kind,omitempty"`
// The project associated with this service
Project *TeamProjectReference `json:"project,omitempty"`
// Optional uri to connect directly to the service such as https://windows.azure.com
ServiceUri *string `json:"serviceUri,omitempty"`
}
type WebApiConnectedServiceDetails struct {
Id *string `json:"id,omitempty"`
Url *string `json:"url,omitempty"`
// Meta data for service connection
ConnectedServiceMetaData *WebApiConnectedService `json:"connectedServiceMetaData,omitempty"`
// Credential info
CredentialsXml *string `json:"credentialsXml,omitempty"`
// Optional uri to connect directly to the service such as https://windows.azure.com
EndPoint *string `json:"endPoint,omitempty"`
}
type WebApiConnectedServiceRef struct {
Id *string `json:"id,omitempty"`
Url *string `json:"url,omitempty"`
}
// The representation of data needed to create a tag definition which is sent across the wire.
type WebApiCreateTagRequestData struct {
// Name of the tag definition that will be created.
Name *string `json:"name,omitempty"`
}
type WebApiProject struct {
// Project abbreviation.
Abbreviation *string `json:"abbreviation,omitempty"`
// Url to default team identity image.
DefaultTeamImageUrl *string `json:"defaultTeamImageUrl,omitempty"`
// The project's description (if any).
Description *string `json:"description,omitempty"`
// Project identifier.
Id *uuid.UUID `json:"id,omitempty"`
// Project last update time.
LastUpdateTime *azuredevops.Time `json:"lastUpdateTime,omitempty"`
// Project name.
Name *string `json:"name,omitempty"`
// Project revision.
Revision *uint64 `json:"revision,omitempty"`
// Project state.
State *ProjectState `json:"state,omitempty"`
// Url to the full version of the object.
Url *string `json:"url,omitempty"`
// Project visibility.
Visibility *ProjectVisibility `json:"visibility,omitempty"`
// Set of capabilities this project has
Capabilities *map[string]map[string]string `json:"capabilities,omitempty"`
// Reference to collection which contains this project
Collection *WebApiProjectCollectionRef `json:"collection,omitempty"`
// Default team for this project
DefaultTeam *WebApiTeamRef `json:"defaultTeam,omitempty"`
}
type WebApiProjectCollection struct {
// Collection Tfs Url (Host Url)
CollectionUrl *string `json:"collectionUrl,omitempty"`
// Collection Guid
Id *uuid.UUID `json:"id,omitempty"`
// Collection Name
Name *string `json:"name,omitempty"`
// Collection REST Url
Url *string `json:"url,omitempty"`
// Project collection description
Description *string `json:"description,omitempty"`
// Project collection state
State *string `json:"state,omitempty"`
}
type WebApiProjectCollectionRef struct {
// Collection Tfs Url (Host Url)
CollectionUrl *string `json:"collectionUrl,omitempty"`
// Collection Guid
Id *uuid.UUID `json:"id,omitempty"`
// Collection Name
Name *string `json:"name,omitempty"`
// Collection REST Url
Url *string `json:"url,omitempty"`
}
// The representation of a tag definition which is sent across the wire.
type WebApiTagDefinition struct {
// Whether or not the tag definition is active.
Active *bool `json:"active,omitempty"`
// ID of the tag definition.
Id *uuid.UUID `json:"id,omitempty"`
// The name of the tag definition.
Name *string `json:"name,omitempty"`
// Resource URL for the Tag Definition.
Url *string `json:"url,omitempty"`
}
type WebApiTeam struct {
// Team (Identity) Guid. A Team Foundation ID.
Id *uuid.UUID `json:"id,omitempty"`
// Team name
Name *string `json:"name,omitempty"`
// Team REST API Url
Url *string `json:"url,omitempty"`
// Team description
Description *string `json:"description,omitempty"`
// Team identity.
Identity *identity.Identity `json:"identity,omitempty"`
// Identity REST API Url to this team
IdentityUrl *string `json:"identityUrl,omitempty"`
ProjectId *uuid.UUID `json:"projectId,omitempty"`
ProjectName *string `json:"projectName,omitempty"`
}
type WebApiTeamRef struct {
// Team (Identity) Guid. A Team Foundation ID.
Id *uuid.UUID `json:"id,omitempty"`
// Team name
Name *string `json:"name,omitempty"`
// Team REST API Url
Url *string `json:"url,omitempty"`
}