|
1 |
| -// -------------------------------------------------------------------------------------------- |
| 1 | +// -------------------------------------------------------------------------------------------- |
2 | 2 | // Copyright (c) Microsoft Corporation. All rights reserved.
|
3 | 3 | // Licensed under the MIT License.
|
4 | 4 | // --------------------------------------------------------------------------------------------
|
|
9 | 9 | package accounts
|
10 | 10 |
|
11 | 11 | import (
|
12 |
| - "github.com/google/uuid" |
13 |
| - "github.com/microsoft/azure-devops-go-api/azuredevops/v6" |
| 12 | + "github.com/google/uuid" |
| 13 | + "github.com/microsoft/azure-devops-go-api/azuredevops/v6" |
14 | 14 | )
|
15 | 15 |
|
16 | 16 | type Account struct {
|
17 |
| - // Identifier for an Account |
18 |
| - AccountId *uuid.UUID `json:"accountId,omitempty"` |
19 |
| - // Name for an account |
20 |
| - AccountName *string `json:"accountName,omitempty"` |
21 |
| - // Owner of account |
22 |
| - AccountOwner *uuid.UUID `json:"accountOwner,omitempty"` |
23 |
| - // Current account status |
24 |
| - AccountStatus *AccountStatus `json:"accountStatus,omitempty"` |
25 |
| - // Type of account: Personal, Organization |
26 |
| - AccountType *AccountType `json:"accountType,omitempty"` |
27 |
| - // Uri for an account |
28 |
| - AccountUri *string `json:"accountUri,omitempty"` |
29 |
| - // Who created the account |
30 |
| - CreatedBy *uuid.UUID `json:"createdBy,omitempty"` |
31 |
| - // Date account was created |
32 |
| - CreatedDate *azuredevops.Time `json:"createdDate,omitempty"` |
33 |
| - HasMoved *bool `json:"hasMoved,omitempty"` |
34 |
| - // Identity of last person to update the account |
35 |
| - LastUpdatedBy *uuid.UUID `json:"lastUpdatedBy,omitempty"` |
36 |
| - // Date account was last updated |
37 |
| - LastUpdatedDate *azuredevops.Time `json:"lastUpdatedDate,omitempty"` |
38 |
| - // Namespace for an account |
39 |
| - NamespaceId *uuid.UUID `json:"namespaceId,omitempty"` |
40 |
| - NewCollectionId *uuid.UUID `json:"newCollectionId,omitempty"` |
41 |
| - // Organization that created the account |
42 |
| - OrganizationName *string `json:"organizationName,omitempty"` |
43 |
| - // Extended properties |
44 |
| - Properties interface{} `json:"properties,omitempty"` |
45 |
| - // Reason for current status |
46 |
| - StatusReason *string `json:"statusReason,omitempty"` |
| 17 | + // Identifier for an Account |
| 18 | + AccountId *uuid.UUID `json:"accountId,omitempty"` |
| 19 | + // Name for an account |
| 20 | + AccountName *string `json:"accountName,omitempty"` |
| 21 | + // Owner of account |
| 22 | + AccountOwner *uuid.UUID `json:"accountOwner,omitempty"` |
| 23 | + // Current account status |
| 24 | + AccountStatus *AccountStatus `json:"accountStatus,omitempty"` |
| 25 | + // Type of account: Personal, Organization |
| 26 | + AccountType *AccountType `json:"accountType,omitempty"` |
| 27 | + // Uri for an account |
| 28 | + AccountUri *string `json:"accountUri,omitempty"` |
| 29 | + // Who created the account |
| 30 | + CreatedBy *uuid.UUID `json:"createdBy,omitempty"` |
| 31 | + // Date account was created |
| 32 | + CreatedDate *azuredevops.Time `json:"createdDate,omitempty"` |
| 33 | + HasMoved *bool `json:"hasMoved,omitempty"` |
| 34 | + // Identity of last person to update the account |
| 35 | + LastUpdatedBy *uuid.UUID `json:"lastUpdatedBy,omitempty"` |
| 36 | + // Date account was last updated |
| 37 | + LastUpdatedDate *azuredevops.Time `json:"lastUpdatedDate,omitempty"` |
| 38 | + // Namespace for an account |
| 39 | + NamespaceId *uuid.UUID `json:"namespaceId,omitempty"` |
| 40 | + NewCollectionId *uuid.UUID `json:"newCollectionId,omitempty"` |
| 41 | + // Organization that created the account |
| 42 | + OrganizationName *string `json:"organizationName,omitempty"` |
| 43 | + // Extended properties |
| 44 | + Properties interface{} `json:"properties,omitempty"` |
| 45 | + // Reason for current status |
| 46 | + StatusReason *string `json:"statusReason,omitempty"` |
47 | 47 | }
|
48 | 48 |
|
49 | 49 | type AccountCreateInfoInternal struct {
|
50 |
| - AccountName *string `json:"accountName,omitempty"` |
51 |
| - Creator *uuid.UUID `json:"creator,omitempty"` |
52 |
| - Organization *string `json:"organization,omitempty"` |
53 |
| - Preferences *AccountPreferencesInternal `json:"preferences,omitempty"` |
54 |
| - Properties interface{} `json:"properties,omitempty"` |
55 |
| - ServiceDefinitions *[]azuredevops.KeyValuePair `json:"serviceDefinitions,omitempty"` |
| 50 | + AccountName *string `json:"accountName,omitempty"` |
| 51 | + Creator *uuid.UUID `json:"creator,omitempty"` |
| 52 | + Organization *string `json:"organization,omitempty"` |
| 53 | + Preferences *AccountPreferencesInternal `json:"preferences,omitempty"` |
| 54 | + Properties interface{} `json:"properties,omitempty"` |
| 55 | + ServiceDefinitions *[]azuredevops.KeyValuePair `json:"serviceDefinitions,omitempty"` |
56 | 56 | }
|
57 | 57 |
|
58 | 58 | type AccountPreferencesInternal struct {
|
59 |
| - Culture interface{} `json:"culture,omitempty"` |
60 |
| - Language interface{} `json:"language,omitempty"` |
61 |
| - TimeZone interface{} `json:"timeZone,omitempty"` |
| 59 | + Culture interface{} `json:"culture,omitempty"` |
| 60 | + Language interface{} `json:"language,omitempty"` |
| 61 | + TimeZone interface{} `json:"timeZone,omitempty"` |
62 | 62 | }
|
63 | 63 |
|
64 | 64 | type AccountStatus string
|
65 | 65 |
|
66 | 66 | type accountStatusValuesType struct {
|
67 |
| - None AccountStatus |
68 |
| - Enabled AccountStatus |
69 |
| - Disabled AccountStatus |
70 |
| - Deleted AccountStatus |
71 |
| - Moved AccountStatus |
| 67 | + None AccountStatus |
| 68 | + Enabled AccountStatus |
| 69 | + Disabled AccountStatus |
| 70 | + Deleted AccountStatus |
| 71 | + Moved AccountStatus |
72 | 72 | }
|
73 | 73 |
|
74 | 74 | var AccountStatusValues = accountStatusValuesType{
|
75 |
| - None: "none", |
76 |
| - // This hosting account is active and assigned to a customer. |
77 |
| - Enabled: "enabled", |
78 |
| - // This hosting account is disabled. |
79 |
| - Disabled: "disabled", |
80 |
| - // This account is part of deletion batch and scheduled for deletion. |
81 |
| - Deleted: "deleted", |
82 |
| - // This account is not mastered locally and has physically moved. |
83 |
| - Moved: "moved", |
| 75 | + None: "none", |
| 76 | + // This hosting account is active and assigned to a customer. |
| 77 | + Enabled: "enabled", |
| 78 | + // This hosting account is disabled. |
| 79 | + Disabled: "disabled", |
| 80 | + // This account is part of deletion batch and scheduled for deletion. |
| 81 | + Deleted: "deleted", |
| 82 | + // This account is not mastered locally and has physically moved. |
| 83 | + Moved: "moved", |
84 | 84 | }
|
85 | 85 |
|
86 | 86 | type AccountType string
|
87 | 87 |
|
88 | 88 | type accountTypeValuesType struct {
|
89 |
| - Personal AccountType |
90 |
| - Organization AccountType |
| 89 | + Personal AccountType |
| 90 | + Organization AccountType |
91 | 91 | }
|
92 | 92 |
|
93 | 93 | var AccountTypeValues = accountTypeValuesType{
|
94 |
| - Personal: "personal", |
95 |
| - Organization: "organization", |
| 94 | + Personal: "personal", |
| 95 | + Organization: "organization", |
96 | 96 | }
|
97 | 97 |
|
98 | 98 | type AccountUserStatus string
|
99 | 99 |
|
100 | 100 | type accountUserStatusValuesType struct {
|
101 |
| - None AccountUserStatus |
102 |
| - Active AccountUserStatus |
103 |
| - Disabled AccountUserStatus |
104 |
| - Deleted AccountUserStatus |
105 |
| - Pending AccountUserStatus |
106 |
| - Expired AccountUserStatus |
107 |
| - PendingDisabled AccountUserStatus |
| 101 | + None AccountUserStatus |
| 102 | + Active AccountUserStatus |
| 103 | + Disabled AccountUserStatus |
| 104 | + Deleted AccountUserStatus |
| 105 | + Pending AccountUserStatus |
| 106 | + Expired AccountUserStatus |
| 107 | + PendingDisabled AccountUserStatus |
108 | 108 | }
|
109 | 109 |
|
110 | 110 | var AccountUserStatusValues = accountUserStatusValuesType{
|
111 |
| - None: "none", |
112 |
| - // User has signed in at least once to the VSTS account |
113 |
| - Active: "active", |
114 |
| - // User cannot sign in; primarily used by admin to temporarily remove a user due to absence or license reallocation |
115 |
| - Disabled: "disabled", |
116 |
| - // User is removed from the VSTS account by the VSTS account admin |
117 |
| - Deleted: "deleted", |
118 |
| - // User is invited to join the VSTS account by the VSTS account admin, but has not signed up/signed in yet |
119 |
| - Pending: "pending", |
120 |
| - // User can sign in; primarily used when license is in expired state and we give a grace period |
121 |
| - Expired: "expired", |
122 |
| - // User is disabled; if reenabled, they will still be in the Pending state |
123 |
| - PendingDisabled: "pendingDisabled", |
| 111 | + None: "none", |
| 112 | + // User has signed in at least once to the VSTS account |
| 113 | + Active: "active", |
| 114 | + // User cannot sign in; primarily used by admin to temporarily remove a user due to absence or license reallocation |
| 115 | + Disabled: "disabled", |
| 116 | + // User is removed from the VSTS account by the VSTS account admin |
| 117 | + Deleted: "deleted", |
| 118 | + // User is invited to join the VSTS account by the VSTS account admin, but has not signed up/signed in yet |
| 119 | + Pending: "pending", |
| 120 | + // User can sign in; primarily used when license is in expired state and we give a grace period |
| 121 | + Expired: "expired", |
| 122 | + // User is disabled; if reenabled, they will still be in the Pending state |
| 123 | + PendingDisabled: "pendingDisabled", |
124 | 124 | }
|
0 commit comments