Skip to content

Commit 0974d01

Browse files
authored
Merge pull request microsoft#112 from microsoft/users/pnechvatal/RegenerateMissingModels
Regenerated clients after updating the genclient
2 parents 9269abb + 0e1d215 commit 0974d01

File tree

124 files changed

+62559
-61661
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+62559
-61661
lines changed

azuredevops/v6/accounts/client.go

Lines changed: 40 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// --------------------------------------------------------------------------------------------
1+
// --------------------------------------------------------------------------------------------
22
// Copyright (c) Microsoft Corporation. All rights reserved.
33
// Licensed under the MIT License.
44
// --------------------------------------------------------------------------------------------
@@ -9,64 +9,63 @@
99
package accounts
1010

1111
import (
12-
"context"
13-
"github.com/google/uuid"
14-
"github.com/microsoft/azure-devops-go-api/azuredevops/v6"
15-
"net/http"
16-
"net/url"
12+
"context"
13+
"github.com/google/uuid"
14+
"github.com/microsoft/azure-devops-go-api/azuredevops/v6"
15+
"net/http"
16+
"net/url"
1717
)
1818

1919
var ResourceAreaId, _ = uuid.Parse("0d55247a-1c47-4462-9b1f-5e2125590ee6")
2020

2121
type Client interface {
22-
// Get a list of accounts for a specific owner or a specific member. One of the following parameters is required: ownerId, memberId.
23-
GetAccounts(context.Context, GetAccountsArgs) (*[]Account, error)
22+
// Get a list of accounts for a specific owner or a specific member. One of the following parameters is required: ownerId, memberId.
23+
GetAccounts(context.Context, GetAccountsArgs) (*[]Account, error)
2424
}
2525

2626
type ClientImpl struct {
27-
Client azuredevops.Client
27+
Client azuredevops.Client
2828
}
2929

3030
func NewClient(ctx context.Context, connection *azuredevops.Connection) (Client, error) {
31-
client, err := connection.GetClientByResourceAreaId(ctx, ResourceAreaId)
32-
if err != nil {
33-
return nil, err
34-
}
35-
return &ClientImpl{
36-
Client: *client,
37-
}, nil
31+
client, err := connection.GetClientByResourceAreaId(ctx, ResourceAreaId)
32+
if err != nil {
33+
return nil, err
34+
}
35+
return &ClientImpl{
36+
Client: *client,
37+
}, nil
3838
}
3939

4040
// Get a list of accounts for a specific owner or a specific member. One of the following parameters is required: ownerId, memberId.
4141
func (client *ClientImpl) GetAccounts(ctx context.Context, args GetAccountsArgs) (*[]Account, error) {
42-
queryParams := url.Values{}
43-
if args.OwnerId != nil {
44-
queryParams.Add("ownerId", (*args.OwnerId).String())
45-
}
46-
if args.MemberId != nil {
47-
queryParams.Add("memberId", (*args.MemberId).String())
48-
}
49-
if args.Properties != nil {
50-
queryParams.Add("properties", *args.Properties)
51-
}
52-
locationId, _ := uuid.Parse("229a6a53-b428-4ffb-a835-e8f36b5b4b1e")
53-
resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", nil, queryParams, nil, "", "application/json", nil)
54-
if err != nil {
55-
return nil, err
56-
}
42+
queryParams := url.Values{}
43+
if args.OwnerId != nil {
44+
queryParams.Add("ownerId", (*args.OwnerId).String())
45+
}
46+
if args.MemberId != nil {
47+
queryParams.Add("memberId", (*args.MemberId).String())
48+
}
49+
if args.Properties != nil {
50+
queryParams.Add("properties", *args.Properties)
51+
}
52+
locationId, _ := uuid.Parse("229a6a53-b428-4ffb-a835-e8f36b5b4b1e")
53+
resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", nil, queryParams, nil, "", "application/json", nil)
54+
if err != nil {
55+
return nil, err
56+
}
5757

58-
var responseValue []Account
59-
err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
60-
return &responseValue, err
58+
var responseValue []Account
59+
err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
60+
return &responseValue, err
6161
}
6262

6363
// Arguments for the GetAccounts function
6464
type GetAccountsArgs struct {
65-
// (optional) ID for the owner of the accounts.
66-
OwnerId *uuid.UUID
67-
// (optional) ID for a member of the accounts.
68-
MemberId *uuid.UUID
69-
// (optional)
70-
Properties *string
65+
// (optional) ID for the owner of the accounts.
66+
OwnerId *uuid.UUID
67+
// (optional) ID for a member of the accounts.
68+
MemberId *uuid.UUID
69+
// (optional)
70+
Properties *string
7171
}
72-

azuredevops/v6/accounts/models.go

Lines changed: 80 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// --------------------------------------------------------------------------------------------
1+
// --------------------------------------------------------------------------------------------
22
// Copyright (c) Microsoft Corporation. All rights reserved.
33
// Licensed under the MIT License.
44
// --------------------------------------------------------------------------------------------
@@ -9,116 +9,116 @@
99
package accounts
1010

1111
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"
1414
)
1515

1616
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"`
4747
}
4848

4949
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"`
5656
}
5757

5858
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"`
6262
}
6363

6464
type AccountStatus string
6565

6666
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
7272
}
7373

7474
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",
8484
}
8585

8686
type AccountType string
8787

8888
type accountTypeValuesType struct {
89-
Personal AccountType
90-
Organization AccountType
89+
Personal AccountType
90+
Organization AccountType
9191
}
9292

9393
var AccountTypeValues = accountTypeValuesType{
94-
Personal: "personal",
95-
Organization: "organization",
94+
Personal: "personal",
95+
Organization: "organization",
9696
}
9797

9898
type AccountUserStatus string
9999

100100
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
108108
}
109109

110110
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",
124124
}

0 commit comments

Comments
 (0)