diff --git a/.vscode/terraform.code-snippets b/.vscode/terraform.code-snippets
index d155848c7..220e696da 100644
--- a/.vscode/terraform.code-snippets
+++ b/.vscode/terraform.code-snippets
@@ -27,7 +27,7 @@
" \"github.com/hashicorp/terraform-plugin-sdk/helper/schema\"",
" \"github.com/hashicorp/terraform-plugin-sdk/helper/validation\"",
"",
- " \"github.com/microsoft/azure-devops-go-api/azuredevops/core\"",
+ " \"github.com/microsoft/azure-devops-go-api/azuredevops/v6/core\"",
" \"github.com/babylonhealth/terraform-provider-bblnazuredevops/bblnazuredevops/internal/client\"",
" \"github.com/babylonhealth/terraform-provider-bblnazuredevops/bblnazuredevops/internal/utils/converter\"",
" \"github.com/babylonhealth/terraform-provider-bblnazuredevops/bblnazuredevops/internal/utils/validate\"",
@@ -80,7 +80,7 @@
" \"github.com/hashicorp/terraform-plugin-sdk/helper/schema\"",
" \"github.com/hashicorp/terraform-plugin-sdk/helper/validation\"",
"",
- " \"github.com/microsoft/azure-devops-go-api/azuredevops/core\"",
+ " \"github.com/microsoft/azure-devops-go-api/azuredevops/v6/core\"",
" \"github.com/babylonhealth/terraform-provider-bblnazuredevops/azuredevops/internal/client\"",
" \"github.com/babylonhealth/terraform-provider-bblnazuredevops/azuredevops/internal/utils/converter\"",
" \"github.com/babylonhealth/terraform-provider-bblnazuredevops/azuredevops/internal/utils/validate\"",
@@ -142,8 +142,8 @@
" \"github.com/hashicorp/terraform-plugin-sdk/helper/resource\"",
" \"github.com/hashicorp/terraform-plugin-sdk/helper/schema\"",
" \"github.com/hashicorp/terraform-plugin-sdk/terraform\"",
- " \"github.com/microsoft/azure-devops-go-api/azuredevops/core\"",
- " \"github.com/microsoft/azure-devops-go-api/azuredevops/operations\"",
+ " \"github.com/microsoft/azure-devops-go-api/azuredevops/v6/core\"",
+ " \"github.com/microsoft/azure-devops-go-api/azuredevops/v6/operations\"",
" \"github.com/stretchr/testify/require\"",
")",
"",
diff --git a/azdosdkmocks/accounts_sdk_mock.go b/azdosdkmocks/accounts_sdk_mock.go
index a9019b444..43ac83408 100644
--- a/azdosdkmocks/accounts_sdk_mock.go
+++ b/azdosdkmocks/accounts_sdk_mock.go
@@ -1,5 +1,5 @@
// Code generated by MockGen. DO NOT EDIT.
-// Source: github.com/microsoft/azure-devops-go-api/azuredevops/accounts (interfaces: Client)
+// Source: github.com/microsoft/azure-devops-go-api/azuredevops/v6/accounts (interfaces: Client)
// Package azdosdkmocks is a generated GoMock package.
package azdosdkmocks
@@ -7,7 +7,7 @@ package azdosdkmocks
import (
context "context"
gomock "github.com/golang/mock/gomock"
- accounts "github.com/microsoft/azure-devops-go-api/azuredevops/accounts"
+ accounts "github.com/microsoft/azure-devops-go-api/azuredevops/v6/accounts"
reflect "reflect"
)
diff --git a/azdosdkmocks/build_sdk_mock.go b/azdosdkmocks/build_sdk_mock.go
index df23d53ea..2255ac83d 100644
--- a/azdosdkmocks/build_sdk_mock.go
+++ b/azdosdkmocks/build_sdk_mock.go
@@ -1,5 +1,5 @@
// Code generated by MockGen. DO NOT EDIT.
-// Source: github.com/microsoft/azure-devops-go-api/azuredevops/build (interfaces: Client)
+// Source: github.com/microsoft/azure-devops-go-api/azuredevops/v6/build (interfaces: Client)
// Package azdosdkmocks is a generated GoMock package.
package azdosdkmocks
@@ -7,8 +7,8 @@ package azdosdkmocks
import (
context "context"
gomock "github.com/golang/mock/gomock"
- build "github.com/microsoft/azure-devops-go-api/azuredevops/build"
- webapi "github.com/microsoft/azure-devops-go-api/azuredevops/webapi"
+ build "github.com/microsoft/azure-devops-go-api/azuredevops/v6/build"
+ webapi "github.com/microsoft/azure-devops-go-api/azuredevops/v6/webapi"
io "io"
reflect "reflect"
)
diff --git a/azdosdkmocks/core_sdk_mock.go b/azdosdkmocks/core_sdk_mock.go
index 2aa9020d9..b86b6ac0c 100644
--- a/azdosdkmocks/core_sdk_mock.go
+++ b/azdosdkmocks/core_sdk_mock.go
@@ -1,5 +1,5 @@
// Code generated by MockGen. DO NOT EDIT.
-// Source: github.com/microsoft/azure-devops-go-api/azuredevops/core (interfaces: Client)
+// Source: github.com/microsoft/azure-devops-go-api/azuredevops/v6/core (interfaces: Client)
// Package azdosdkmocks is a generated GoMock package.
package azdosdkmocks
@@ -7,9 +7,9 @@ package azdosdkmocks
import (
context "context"
gomock "github.com/golang/mock/gomock"
- core "github.com/microsoft/azure-devops-go-api/azuredevops/core"
- operations "github.com/microsoft/azure-devops-go-api/azuredevops/operations"
- webapi "github.com/microsoft/azure-devops-go-api/azuredevops/webapi"
+ core "github.com/microsoft/azure-devops-go-api/azuredevops/v6/core"
+ operations "github.com/microsoft/azure-devops-go-api/azuredevops/v6/operations"
+ webapi "github.com/microsoft/azure-devops-go-api/azuredevops/v6/webapi"
reflect "reflect"
)
diff --git a/azdosdkmocks/featuremanagement_sdk_mock.go b/azdosdkmocks/featuremanagement_sdk_mock.go
index a4951364a..6f760d2b2 100644
--- a/azdosdkmocks/featuremanagement_sdk_mock.go
+++ b/azdosdkmocks/featuremanagement_sdk_mock.go
@@ -1,5 +1,5 @@
// Code generated by MockGen. DO NOT EDIT.
-// Source: github.com/microsoft/azure-devops-go-api/azuredevops/featuremanagement (interfaces: Client)
+// Source: github.com/microsoft/azure-devops-go-api/azuredevops/v6/featuremanagement (interfaces: Client)
// Package azdosdkmocks is a generated GoMock package.
package azdosdkmocks
@@ -7,7 +7,7 @@ package azdosdkmocks
import (
context "context"
gomock "github.com/golang/mock/gomock"
- featuremanagement "github.com/microsoft/azure-devops-go-api/azuredevops/featuremanagement"
+ featuremanagement "github.com/microsoft/azure-devops-go-api/azuredevops/v6/featuremanagement"
reflect "reflect"
)
diff --git a/azdosdkmocks/git_sdk_mock.go b/azdosdkmocks/git_sdk_mock.go
index a92617d4b..fef3dd741 100644
--- a/azdosdkmocks/git_sdk_mock.go
+++ b/azdosdkmocks/git_sdk_mock.go
@@ -1,5 +1,5 @@
// Code generated by MockGen. DO NOT EDIT.
-// Source: github.com/microsoft/azure-devops-go-api/azuredevops/git (interfaces: Client)
+// Source: github.com/microsoft/azure-devops-go-api/azuredevops/v6/git (interfaces: Client)
// Package azdosdkmocks is a generated GoMock package.
package azdosdkmocks
@@ -7,9 +7,9 @@ package azdosdkmocks
import (
context "context"
gomock "github.com/golang/mock/gomock"
- core "github.com/microsoft/azure-devops-go-api/azuredevops/core"
- git "github.com/microsoft/azure-devops-go-api/azuredevops/git"
- webapi "github.com/microsoft/azure-devops-go-api/azuredevops/webapi"
+ core "github.com/microsoft/azure-devops-go-api/azuredevops/v6/core"
+ git "github.com/microsoft/azure-devops-go-api/azuredevops/v6/git"
+ webapi "github.com/microsoft/azure-devops-go-api/azuredevops/v6/webapi"
io "io"
reflect "reflect"
)
diff --git a/azdosdkmocks/graph_sdk_mock.go b/azdosdkmocks/graph_sdk_mock.go
index 19c7ebf69..7244375a3 100644
--- a/azdosdkmocks/graph_sdk_mock.go
+++ b/azdosdkmocks/graph_sdk_mock.go
@@ -1,5 +1,5 @@
// Code generated by MockGen. DO NOT EDIT.
-// Source: github.com/microsoft/azure-devops-go-api/azuredevops/graph (interfaces: Client)
+// Source: github.com/microsoft/azure-devops-go-api/azuredevops/v6/graph (interfaces: Client)
// Package azdosdkmocks is a generated GoMock package.
package azdosdkmocks
@@ -7,8 +7,8 @@ package azdosdkmocks
import (
context "context"
gomock "github.com/golang/mock/gomock"
- graph "github.com/microsoft/azure-devops-go-api/azuredevops/graph"
- profile "github.com/microsoft/azure-devops-go-api/azuredevops/profile"
+ graph "github.com/microsoft/azure-devops-go-api/azuredevops/v6/graph"
+ profile "github.com/microsoft/azure-devops-go-api/azuredevops/v6/profile"
reflect "reflect"
)
diff --git a/azdosdkmocks/identity_sdk_mock.go b/azdosdkmocks/identity_sdk_mock.go
index ed8cf624f..88cda0453 100644
--- a/azdosdkmocks/identity_sdk_mock.go
+++ b/azdosdkmocks/identity_sdk_mock.go
@@ -1,5 +1,5 @@
// Code generated by MockGen. DO NOT EDIT.
-// Source: github.com/microsoft/azure-devops-go-api/azuredevops/identity (interfaces: Client)
+// Source: github.com/microsoft/azure-devops-go-api/azuredevops/v6/identity (interfaces: Client)
// Package azdosdkmocks is a generated GoMock package.
package azdosdkmocks
@@ -8,8 +8,8 @@ import (
context "context"
gomock "github.com/golang/mock/gomock"
uuid "github.com/google/uuid"
- delegatedauthorization "github.com/microsoft/azure-devops-go-api/azuredevops/delegatedauthorization"
- identity "github.com/microsoft/azure-devops-go-api/azuredevops/identity"
+ delegatedauthorization "github.com/microsoft/azure-devops-go-api/azuredevops/v6/delegatedauthorization"
+ identity "github.com/microsoft/azure-devops-go-api/azuredevops/v6/identity"
reflect "reflect"
)
diff --git a/azdosdkmocks/memberentitlementmanagement_sdk_mock.go b/azdosdkmocks/memberentitlementmanagement_sdk_mock.go
index fcfa0bcab..06845c176 100644
--- a/azdosdkmocks/memberentitlementmanagement_sdk_mock.go
+++ b/azdosdkmocks/memberentitlementmanagement_sdk_mock.go
@@ -1,5 +1,5 @@
// Code generated by MockGen. DO NOT EDIT.
-// Source: github.com/microsoft/azure-devops-go-api/azuredevops/memberentitlementmanagement (interfaces: Client)
+// Source: github.com/microsoft/azure-devops-go-api/azuredevops/v6/memberentitlementmanagement (interfaces: Client)
// Package azdosdkmocks is a generated GoMock package.
package azdosdkmocks
@@ -7,7 +7,7 @@ package azdosdkmocks
import (
context "context"
gomock "github.com/golang/mock/gomock"
- memberentitlementmanagement "github.com/microsoft/azure-devops-go-api/azuredevops/memberentitlementmanagement"
+ memberentitlementmanagement "github.com/microsoft/azure-devops-go-api/azuredevops/v6/memberentitlementmanagement"
reflect "reflect"
)
@@ -168,7 +168,7 @@ func (mr *MockMemberentitlementmanagementClientMockRecorder) GetUserEntitlement(
}
// GetUserEntitlements mocks base method
-func (m *MockMemberentitlementmanagementClient) GetUserEntitlements(arg0 context.Context, arg1 memberentitlementmanagement.GetUserEntitlementsArgs) (*memberentitlementmanagement.PagedGraphMemberList, error) {
+func (m *MockMemberentitlementmanagementClient) GetUserEntitlements(arg0 context.Context, arg1 memberentitlementmanagement.GetUserEntitlementArgs) (*memberentitlementmanagement.PagedGraphMemberList, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetUserEntitlements", arg0, arg1)
ret0, _ := ret[0].(*memberentitlementmanagement.PagedGraphMemberList)
diff --git a/azdosdkmocks/operations_sdk_mock.go b/azdosdkmocks/operations_sdk_mock.go
index 523e83d94..fdfb9ef82 100644
--- a/azdosdkmocks/operations_sdk_mock.go
+++ b/azdosdkmocks/operations_sdk_mock.go
@@ -1,5 +1,5 @@
// Code generated by MockGen. DO NOT EDIT.
-// Source: github.com/microsoft/azure-devops-go-api/azuredevops/operations (interfaces: Client)
+// Source: github.com/microsoft/azure-devops-go-api/azuredevops/v6/operations (interfaces: Client)
// Package azdosdkmocks is a generated GoMock package.
package azdosdkmocks
@@ -7,7 +7,7 @@ package azdosdkmocks
import (
context "context"
gomock "github.com/golang/mock/gomock"
- operations "github.com/microsoft/azure-devops-go-api/azuredevops/operations"
+ operations "github.com/microsoft/azure-devops-go-api/azuredevops/v6/operations"
reflect "reflect"
)
diff --git a/azdosdkmocks/policy_sdk_mock.go b/azdosdkmocks/policy_sdk_mock.go
index 75b34ab55..4e1259d6e 100644
--- a/azdosdkmocks/policy_sdk_mock.go
+++ b/azdosdkmocks/policy_sdk_mock.go
@@ -1,5 +1,5 @@
// Code generated by MockGen. DO NOT EDIT.
-// Source: github.com/microsoft/azure-devops-go-api/azuredevops/policy (interfaces: Client)
+// Source: github.com/microsoft/azure-devops-go-api/azuredevops/v6/policy (interfaces: Client)
// Package azdosdkmocks is a generated GoMock package.
package azdosdkmocks
@@ -7,7 +7,7 @@ package azdosdkmocks
import (
context "context"
gomock "github.com/golang/mock/gomock"
- policy "github.com/microsoft/azure-devops-go-api/azuredevops/policy"
+ policy "github.com/microsoft/azure-devops-go-api/azuredevops/v6/policy"
reflect "reflect"
)
diff --git a/azdosdkmocks/profile_sdk_mock.go b/azdosdkmocks/profile_sdk_mock.go
index 4bb688828..c721372d5 100644
--- a/azdosdkmocks/profile_sdk_mock.go
+++ b/azdosdkmocks/profile_sdk_mock.go
@@ -1,5 +1,5 @@
// Code generated by MockGen. DO NOT EDIT.
-// Source: github.com/microsoft/azure-devops-go-api/azuredevops/profile (interfaces: Client)
+// Source: github.com/microsoft/azure-devops-go-api/azuredevops/v6/profile (interfaces: Client)
// Package azdosdkmocks is a generated GoMock package.
package azdosdkmocks
@@ -7,7 +7,7 @@ package azdosdkmocks
import (
context "context"
gomock "github.com/golang/mock/gomock"
- profile "github.com/microsoft/azure-devops-go-api/azuredevops/profile"
+ profile "github.com/microsoft/azure-devops-go-api/azuredevops/v6/profile"
reflect "reflect"
)
diff --git a/azdosdkmocks/security_sdk_mock.go b/azdosdkmocks/security_sdk_mock.go
index abfa34975..c6f7224b2 100644
--- a/azdosdkmocks/security_sdk_mock.go
+++ b/azdosdkmocks/security_sdk_mock.go
@@ -1,5 +1,5 @@
// Code generated by MockGen. DO NOT EDIT.
-// Source: github.com/microsoft/azure-devops-go-api/azuredevops/security (interfaces: Client)
+// Source: github.com/microsoft/azure-devops-go-api/azuredevops/v6/security (interfaces: Client)
// Package azdosdkmocks is a generated GoMock package.
package azdosdkmocks
@@ -7,7 +7,7 @@ package azdosdkmocks
import (
context "context"
gomock "github.com/golang/mock/gomock"
- security "github.com/microsoft/azure-devops-go-api/azuredevops/security"
+ security "github.com/microsoft/azure-devops-go-api/azuredevops/v6/security"
reflect "reflect"
)
diff --git a/azdosdkmocks/serviceendpoint_sdk_mock.go b/azdosdkmocks/serviceendpoint_sdk_mock.go
index 054b5b176..aad82f2a4 100644
--- a/azdosdkmocks/serviceendpoint_sdk_mock.go
+++ b/azdosdkmocks/serviceendpoint_sdk_mock.go
@@ -1,5 +1,5 @@
// Code generated by MockGen. DO NOT EDIT.
-// Source: github.com/microsoft/azure-devops-go-api/azuredevops/serviceendpoint (interfaces: Client)
+// Source: github.com/microsoft/azure-devops-go-api/azuredevops/v6/serviceendpoint (interfaces: Client)
// Package azdosdkmocks is a generated GoMock package.
package azdosdkmocks
@@ -7,7 +7,7 @@ package azdosdkmocks
import (
context "context"
gomock "github.com/golang/mock/gomock"
- serviceendpoint "github.com/microsoft/azure-devops-go-api/azuredevops/serviceendpoint"
+ serviceendpoint "github.com/microsoft/azure-devops-go-api/azuredevops/v6/serviceendpoint"
reflect "reflect"
)
diff --git a/azdosdkmocks/taskagent_sdk_mock.go b/azdosdkmocks/taskagent_sdk_mock.go
index 3ab14aa57..c9b857f70 100644
--- a/azdosdkmocks/taskagent_sdk_mock.go
+++ b/azdosdkmocks/taskagent_sdk_mock.go
@@ -1,5 +1,5 @@
// Code generated by MockGen. DO NOT EDIT.
-// Source: github.com/microsoft/azure-devops-go-api/azuredevops/taskagent (interfaces: Client)
+// Source: github.com/microsoft/azure-devops-go-api/azuredevops/v6/taskagent (interfaces: Client)
// Package azdosdkmocks is a generated GoMock package.
package azdosdkmocks
@@ -7,7 +7,7 @@ package azdosdkmocks
import (
context "context"
gomock "github.com/golang/mock/gomock"
- taskagent "github.com/microsoft/azure-devops-go-api/azuredevops/taskagent"
+ taskagent "github.com/microsoft/azure-devops-go-api/azuredevops/v6/taskagent"
reflect "reflect"
)
diff --git a/azdosdkmocks/test_sdk_mock.go b/azdosdkmocks/test_sdk_mock.go
index 94695628b..de49d07ac 100644
--- a/azdosdkmocks/test_sdk_mock.go
+++ b/azdosdkmocks/test_sdk_mock.go
@@ -1,5 +1,5 @@
// Code generated by MockGen. DO NOT EDIT.
-// Source: github.com/microsoft/azure-devops-go-api/azuredevops/test (interfaces: Client)
+// Source: github.com/microsoft/azure-devops-go-api/azuredevops/v6/test (interfaces: Client)
// Package azdosdkmocks is a generated GoMock package.
package azdosdkmocks
@@ -7,7 +7,7 @@ package azdosdkmocks
import (
context "context"
gomock "github.com/golang/mock/gomock"
- test "github.com/microsoft/azure-devops-go-api/azuredevops/test"
+ test "github.com/microsoft/azure-devops-go-api/azuredevops/v6/test"
io "io"
reflect "reflect"
)
diff --git a/azdosdkmocks/workitemtracking_sdk_mock.go b/azdosdkmocks/workitemtracking_sdk_mock.go
index 8bb92d33e..1b6335f78 100644
--- a/azdosdkmocks/workitemtracking_sdk_mock.go
+++ b/azdosdkmocks/workitemtracking_sdk_mock.go
@@ -1,5 +1,5 @@
// Code generated by MockGen. DO NOT EDIT.
-// Source: github.com/microsoft/azure-devops-go-api/azuredevops/workitemtracking (interfaces: Client)
+// Source: github.com/microsoft/azure-devops-go-api/azuredevops/v6/workitemtracking (interfaces: Client)
// Package azdosdkmocks is a generated GoMock package.
package azdosdkmocks
@@ -7,8 +7,8 @@ package azdosdkmocks
import (
context "context"
gomock "github.com/golang/mock/gomock"
- webapi "github.com/microsoft/azure-devops-go-api/azuredevops/webapi"
- workitemtracking "github.com/microsoft/azure-devops-go-api/azuredevops/workitemtracking"
+ webapi "github.com/microsoft/azure-devops-go-api/azuredevops/v6/webapi"
+ workitemtracking "github.com/microsoft/azure-devops-go-api/azuredevops/v6/workitemtracking"
io "io"
reflect "reflect"
)
diff --git a/bblnazuredevops/internal/client/client.go b/bblnazuredevops/internal/client/client.go
index 42e6959b4..f7a4eb391 100644
--- a/bblnazuredevops/internal/client/client.go
+++ b/bblnazuredevops/internal/client/client.go
@@ -10,21 +10,21 @@ import (
"strings"
"github.com/babylonhealth/terraform-provider-bblnazuredevops/version"
- "github.com/microsoft/azure-devops-go-api/azuredevops"
- "github.com/microsoft/azure-devops-go-api/azuredevops/build"
- "github.com/microsoft/azure-devops-go-api/azuredevops/core"
- "github.com/microsoft/azure-devops-go-api/azuredevops/featuremanagement"
- "github.com/microsoft/azure-devops-go-api/azuredevops/git"
- "github.com/microsoft/azure-devops-go-api/azuredevops/graph"
- "github.com/microsoft/azure-devops-go-api/azuredevops/identity"
- "github.com/microsoft/azure-devops-go-api/azuredevops/memberentitlementmanagement"
- "github.com/microsoft/azure-devops-go-api/azuredevops/operations"
- "github.com/microsoft/azure-devops-go-api/azuredevops/policy"
- "github.com/microsoft/azure-devops-go-api/azuredevops/release"
- "github.com/microsoft/azure-devops-go-api/azuredevops/security"
- "github.com/microsoft/azure-devops-go-api/azuredevops/serviceendpoint"
- "github.com/microsoft/azure-devops-go-api/azuredevops/taskagent"
- "github.com/microsoft/azure-devops-go-api/azuredevops/workitemtracking"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/build"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/core"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/featuremanagement"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/git"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/graph"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/identity"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/memberentitlementmanagement"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/operations"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/policy"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/release"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/security"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/serviceendpoint"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/taskagent"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/workitemtracking"
)
// AggregatedClient aggregates all of the underlying clients into a single data
diff --git a/bblnazuredevops/internal/service/permissions/utils/classification.go b/bblnazuredevops/internal/service/permissions/utils/classification.go
index 8c6b0aecd..98487c83b 100644
--- a/bblnazuredevops/internal/service/permissions/utils/classification.go
+++ b/bblnazuredevops/internal/service/permissions/utils/classification.go
@@ -8,7 +8,7 @@ import (
"github.com/ahmetb/go-linq"
"github.com/babylonhealth/terraform-provider-bblnazuredevops/bblnazuredevops/internal/utils/converter"
- "github.com/microsoft/azure-devops-go-api/azuredevops/workitemtracking"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/workitemtracking"
)
const aclClassificationNodeTokenPrefix = "vstfs:///Classification/Node/"
diff --git a/bblnazuredevops/internal/service/permissions/utils/classification_test.go b/bblnazuredevops/internal/service/permissions/utils/classification_test.go
index 944f2fd98..2ba0b7c78 100644
--- a/bblnazuredevops/internal/service/permissions/utils/classification_test.go
+++ b/bblnazuredevops/internal/service/permissions/utils/classification_test.go
@@ -14,7 +14,7 @@ import (
"github.com/babylonhealth/terraform-provider-bblnazuredevops/bblnazuredevops/internal/utils/converter"
"github.com/golang/mock/gomock"
"github.com/google/uuid"
- "github.com/microsoft/azure-devops-go-api/azuredevops/workitemtracking"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/workitemtracking"
"github.com/stretchr/testify/assert"
)
diff --git a/bblnazuredevops/internal/service/permissions/utils/namespaces.go b/bblnazuredevops/internal/service/permissions/utils/namespaces.go
index fe1bdc992..e87f20f7c 100644
--- a/bblnazuredevops/internal/service/permissions/utils/namespaces.go
+++ b/bblnazuredevops/internal/service/permissions/utils/namespaces.go
@@ -11,8 +11,8 @@ import (
"github.com/babylonhealth/terraform-provider-bblnazuredevops/bblnazuredevops/internal/utils/converter"
"github.com/google/uuid"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
- "github.com/microsoft/azure-devops-go-api/azuredevops/identity"
- "github.com/microsoft/azure-devops-go-api/azuredevops/security"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/identity"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/security"
)
// ActionName type for an permission actions
diff --git a/bblnazuredevops/internal/service/permissions/utils/namespaces_test.go b/bblnazuredevops/internal/service/permissions/utils/namespaces_test.go
index 25a9910c3..5e92cd29d 100644
--- a/bblnazuredevops/internal/service/permissions/utils/namespaces_test.go
+++ b/bblnazuredevops/internal/service/permissions/utils/namespaces_test.go
@@ -19,8 +19,8 @@ import (
"github.com/golang/mock/gomock"
"github.com/google/uuid"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
- "github.com/microsoft/azure-devops-go-api/azuredevops/identity"
- "github.com/microsoft/azure-devops-go-api/azuredevops/security"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/identity"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/security"
"github.com/stretchr/testify/assert"
)
diff --git a/bblnazuredevops/internal/service/serviceendpoint/commons.go b/bblnazuredevops/internal/service/serviceendpoint/commons.go
index 602ee001f..f93f58210 100644
--- a/bblnazuredevops/internal/service/serviceendpoint/commons.go
+++ b/bblnazuredevops/internal/service/serviceendpoint/commons.go
@@ -14,15 +14,15 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/validation"
- "github.com/microsoft/azure-devops-go-api/azuredevops/serviceendpoint"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/serviceendpoint"
)
const errMsgTfConfigRead = "Error reading terraform configuration: %+v"
const errMsgServiceCreate = "Error looking up service endpoint given ID (%s) and project ID (%s): %v "
const errMsgServiceDelete = "Error delete service endpoint. ServiceEndpointID: %s, projectID: %s. %v "
-type flatFunc func(d *schema.ResourceData, serviceEndpoint *serviceendpoint.ServiceEndpoint, projectID *string)
-type expandFunc func(d *schema.ResourceData) (*serviceendpoint.ServiceEndpoint, *string, error)
+type flatFunc func(d *schema.ResourceData, serviceEndpoint *serviceendpoint.ServiceEndpoint, projectID *uuid.UUID)
+type expandFunc func(d *schema.ResourceData) (*serviceendpoint.ServiceEndpoint, *uuid.UUID, error)
type operationState struct {
Ready string
@@ -56,7 +56,7 @@ func genBaseServiceEndpointResource(f flatFunc, e expandFunc) *schema.Resource {
Type: schema.TypeString,
Required: true,
ForceNew: true,
- ValidateFunc: validation.StringIsNotWhiteSpace,
+ ValidateFunc: validation.IsUUID,
},
"service_endpoint_name": {
Type: schema.TypeString,
@@ -84,14 +84,14 @@ func genBaseServiceEndpointResource(f flatFunc, e expandFunc) *schema.Resource {
}
// doBaseExpansion performs the expansion for the 'base' attributes that are defined in the schema, above
-func doBaseExpansion(d *schema.ResourceData) (*serviceendpoint.ServiceEndpoint, *string) {
+func doBaseExpansion(d *schema.ResourceData) (*serviceendpoint.ServiceEndpoint, *uuid.UUID) {
// an "error" is OK here as it is expected in the case that the ID is not set in the resource data
var serviceEndpointID *uuid.UUID
parsedID, err := uuid.Parse(d.Id())
if err == nil {
serviceEndpointID = &parsedID
}
- projectID := converter.String(d.Get("project_id").(string))
+ projectID := uuid.MustParse(d.Get("project_id").(string))
serviceEndpoint := &serviceendpoint.ServiceEndpoint{
Id: serviceEndpointID,
Name: converter.String(d.Get("service_endpoint_name").(string)),
@@ -99,14 +99,14 @@ func doBaseExpansion(d *schema.ResourceData) (*serviceendpoint.ServiceEndpoint,
Description: converter.String(d.Get("description").(string)),
}
- return serviceEndpoint, projectID
+ return serviceEndpoint, &projectID
}
// doBaseFlattening performs the flattening for the 'base' attributes that are defined in the schema, above
-func doBaseFlattening(d *schema.ResourceData, serviceEndpoint *serviceendpoint.ServiceEndpoint, projectID *string) {
+func doBaseFlattening(d *schema.ResourceData, serviceEndpoint *serviceendpoint.ServiceEndpoint, projectID *uuid.UUID) {
d.SetId(serviceEndpoint.Id.String())
d.Set("service_endpoint_name", serviceEndpoint.Name)
- d.Set("project_id", projectID)
+ d.Set("project_id", projectID.String())
d.Set("description", serviceEndpoint.Description)
d.Set("authorization", &map[string]interface{}{
"scheme": *serviceEndpoint.Authorization.Scheme,
@@ -183,13 +183,13 @@ func genServiceEndpointReadFunc(flatFunc flatFunc) func(d *schema.ResourceData,
return fmt.Errorf("Error parsing the service endpoint ID from the Terraform resource data: %v", err)
}
serviceEndpointID = &parsedServiceEndpointID
- projectID := converter.String(d.Get("project_id").(string))
+ projectID := converter.UUID(d.Get("project_id").(string))
serviceEndpoint, err := clients.ServiceEndpointClient.GetServiceEndpointDetails(
clients.Ctx,
serviceendpoint.GetServiceEndpointDetailsArgs{
EndpointId: serviceEndpointID,
- Project: projectID,
+ Project: converter.String(projectID.String()),
},
)
if err != nil {
@@ -241,7 +241,7 @@ func genServiceEndpointDeleteFunc(expandFunc expandFunc) schema.DeleteFunc {
}
// Make the Azure DevOps API call to create the endpoint
-func createServiceEndpoint(clients *client.AggregatedClient, endpoint *serviceendpoint.ServiceEndpoint, project *string) (*serviceendpoint.ServiceEndpoint, error) {
+func createServiceEndpoint(clients *client.AggregatedClient, endpoint *serviceendpoint.ServiceEndpoint, project *uuid.UUID) (*serviceendpoint.ServiceEndpoint, error) {
if strings.EqualFold(*endpoint.Type, "github") && strings.EqualFold(*endpoint.Authorization.Scheme, "InstallationToken") {
return nil, fmt.Errorf("Github Apps must be created on Github and then can be imported")
}
@@ -249,19 +249,18 @@ func createServiceEndpoint(clients *client.AggregatedClient, endpoint *serviceen
clients.Ctx,
serviceendpoint.CreateServiceEndpointArgs{
Endpoint: endpoint,
- Project: project,
})
return createdServiceEndpoint, err
}
// Service endpoint delete is an async operation, make sure service endpoint is deleted.
-func checkServiceEndpointStatus(clients *client.AggregatedClient, projectID *string, endPointID *uuid.UUID) resource.StateRefreshFunc {
+func checkServiceEndpointStatus(clients *client.AggregatedClient, projectID *uuid.UUID, endPointID *uuid.UUID) resource.StateRefreshFunc {
return func() (interface{}, string, error) {
serviceEndpoint, err := clients.ServiceEndpointClient.GetServiceEndpointDetails(
clients.Ctx,
serviceendpoint.GetServiceEndpointDetailsArgs{
- Project: projectID,
+ Project: converter.String(projectID.String()),
EndpointId: endPointID,
})
@@ -279,27 +278,35 @@ func checkServiceEndpointStatus(clients *client.AggregatedClient, projectID *str
}
}
-func updateServiceEndpoint(clients *client.AggregatedClient, endpoint *serviceendpoint.ServiceEndpoint, project *string) (*serviceendpoint.ServiceEndpoint, error) {
+func updateServiceEndpoint(clients *client.AggregatedClient, endpoint *serviceendpoint.ServiceEndpoint, projectID *uuid.UUID) (*serviceendpoint.ServiceEndpoint, error) {
if strings.EqualFold(*endpoint.Type, "github") && strings.EqualFold(*endpoint.Authorization.Scheme, "InstallationToken") {
return nil, fmt.Errorf("Github Apps can not be updated must match imported values exactly")
}
+ endpoint.ServiceEndpointProjectReferences = &[]serviceendpoint.ServiceEndpointProjectReference{
+ {
+ ProjectReference: &serviceendpoint.ProjectReference{
+ Id: projectID,
+ },
+ },
+ }
updatedServiceEndpoint, err := clients.ServiceEndpointClient.UpdateServiceEndpoint(
clients.Ctx,
serviceendpoint.UpdateServiceEndpointArgs{
Endpoint: endpoint,
- Project: project,
EndpointId: endpoint.Id,
})
return updatedServiceEndpoint, err
}
-func deleteServiceEndpoint(clients *client.AggregatedClient, projectID *string, serviceEndpointID *uuid.UUID, timeout time.Duration) error {
+func deleteServiceEndpoint(clients *client.AggregatedClient, projectID *uuid.UUID, serviceEndpointID *uuid.UUID, timeout time.Duration) error {
if err := clients.ServiceEndpointClient.DeleteServiceEndpoint(
clients.Ctx,
serviceendpoint.DeleteServiceEndpointArgs{
- Project: projectID,
EndpointId: serviceEndpointID,
+ ProjectIds: &[]string{
+ projectID.String(),
+ },
}); err != nil {
return fmt.Errorf(" Delete service endpoint error %v", err)
}
@@ -320,13 +327,13 @@ func deleteServiceEndpoint(clients *client.AggregatedClient, projectID *string,
return nil
}
-func getServiceEndpoint(client *client.AggregatedClient, serviceEndpointID *uuid.UUID, projectID *string) resource.StateRefreshFunc {
+func getServiceEndpoint(client *client.AggregatedClient, serviceEndpointID *uuid.UUID, projectID *uuid.UUID) resource.StateRefreshFunc {
return func() (interface{}, string, error) {
serviceEndpoint, err := client.ServiceEndpointClient.GetServiceEndpointDetails(
client.Ctx,
serviceendpoint.GetServiceEndpointDetailsArgs{
EndpointId: serviceEndpointID,
- Project: projectID,
+ Project: converter.String(projectID.String()),
},
)
diff --git a/bblnazuredevops/internal/service/serviceendpoint/resource_serviceendpoint_babylonawsiam.go b/bblnazuredevops/internal/service/serviceendpoint/resource_serviceendpoint_babylonawsiam.go
index 333a77955..cec80877d 100644
--- a/bblnazuredevops/internal/service/serviceendpoint/resource_serviceendpoint_babylonawsiam.go
+++ b/bblnazuredevops/internal/service/serviceendpoint/resource_serviceendpoint_babylonawsiam.go
@@ -3,8 +3,9 @@ package serviceendpoint
import (
"github.com/babylonhealth/terraform-provider-bblnazuredevops/bblnazuredevops/internal/utils/converter"
"github.com/babylonhealth/terraform-provider-bblnazuredevops/bblnazuredevops/internal/utils/tfhelper"
+ "github.com/google/uuid"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
- "github.com/microsoft/azure-devops-go-api/azuredevops/serviceendpoint"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/serviceendpoint"
)
const BABYLON_AWS_IAM_SERVICE_CONNECTION_TYPE string = "babylon-service-endpoint-aws-iam"
@@ -41,7 +42,7 @@ func ResourceServiceEndpointBabylonAwsIam() *schema.Resource {
}
// Convert internal Terraform data structure to an AzDO data structure
-func expandServiceEndpointBabylonAwsIam(d *schema.ResourceData) (*serviceendpoint.ServiceEndpoint, *string, error) {
+func expandServiceEndpointBabylonAwsIam(d *schema.ResourceData) (*serviceendpoint.ServiceEndpoint, *uuid.UUID, error) {
serviceEndpoint, projectID := doBaseExpansion(d)
serviceEndpoint.Authorization = &serviceendpoint.EndpointAuthorization{
Parameters: &map[string]string{
@@ -59,7 +60,7 @@ func expandServiceEndpointBabylonAwsIam(d *schema.ResourceData) (*serviceendpoin
}
// Convert AzDO data structure to internal Terraform data structure
-func flattenServiceEndpointBabylonAwsIam(d *schema.ResourceData, serviceEndpoint *serviceendpoint.ServiceEndpoint, projectID *string) {
+func flattenServiceEndpointBabylonAwsIam(d *schema.ResourceData, serviceEndpoint *serviceendpoint.ServiceEndpoint, projectID *uuid.UUID) {
doBaseFlattening(d, serviceEndpoint, projectID)
tfhelper.HelpFlattenSecret(d, "password")
diff --git a/bblnazuredevops/internal/service/serviceendpoint/resource_serviceendpoint_babylonawsiam_test.go b/bblnazuredevops/internal/service/serviceendpoint/resource_serviceendpoint_babylonawsiam_test.go
index 313dfd147..1ce3ae784 100644
--- a/bblnazuredevops/internal/service/serviceendpoint/resource_serviceendpoint_babylonawsiam_test.go
+++ b/bblnazuredevops/internal/service/serviceendpoint/resource_serviceendpoint_babylonawsiam_test.go
@@ -2,6 +2,7 @@ package serviceendpoint
import (
"fmt"
+ "github.com/google/uuid"
"testing"
"github.com/babylonhealth/terraform-provider-bblnazuredevops/bblnazuredevops/internal/utils/converter"
@@ -10,7 +11,7 @@ import (
"github.com/hashicorp/go-multierror"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/validation"
- "github.com/microsoft/azure-devops-go-api/azuredevops/serviceendpoint"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/serviceendpoint"
)
func TestResourceServiceEndpointBabylonAwsIam(t *testing.T) {
@@ -105,7 +106,7 @@ func Test_expandServiceEndpointBabylonAwsIam(t *testing.T) {
name string
args args
want *serviceendpoint.ServiceEndpoint
- wantProject *string
+ wantProject *uuid.UUID
wantErr bool
}{
{
@@ -114,7 +115,7 @@ func Test_expandServiceEndpointBabylonAwsIam(t *testing.T) {
username: "user",
password: "password",
globaRoleArn: "roleArn",
- project: "project",
+ project: "3c49c3b6-a06d-424d-a6b6-0cd375ee9261",
},
want: &serviceendpoint.ServiceEndpoint{
Authorization: &serviceendpoint.EndpointAuthorization{
@@ -133,7 +134,7 @@ func Test_expandServiceEndpointBabylonAwsIam(t *testing.T) {
Name: converter.String(""),
Url: converter.String("https://aws.amazon.com/"),
},
- wantProject: converter.String("project"),
+ wantProject: converter.UUID("3c49c3b6-a06d-424d-a6b6-0cd375ee9261"),
},
}
for _, tt := range tests {
@@ -187,7 +188,7 @@ func Test_flattenServiceEndpointBabylonAwsIam(t *testing.T) {
type args struct {
d *schema.ResourceData
serviceEndpoint *serviceendpoint.ServiceEndpoint
- projectID *string
+ projectID *uuid.UUID
}
tests := []struct {
name string
@@ -211,7 +212,7 @@ func Test_flattenServiceEndpointBabylonAwsIam(t *testing.T) {
Scheme: converter.String("UsernamePassword"),
},
},
- projectID: converter.String("project"),
+ projectID: converter.UUID("3c49c3b6-a06d-424d-a6b6-0cd375ee9261"),
},
expected: map[string]string{
"id": "1ceae7ff-565c-4cdf-9214-6e2246cba764",
@@ -221,7 +222,7 @@ func Test_flattenServiceEndpointBabylonAwsIam(t *testing.T) {
"password": "password1",
"global_role_arn": "roleArn1",
"global_sts_session_name": "sessionName1",
- "project_id": "project",
+ "project_id": "3c49c3b6-a06d-424d-a6b6-0cd375ee9261",
"service_endpoint_name": "",
"username": "user1",
},
diff --git a/bblnazuredevops/internal/service/serviceendpoint/resource_serviceendpoint_babylonvault.go b/bblnazuredevops/internal/service/serviceendpoint/resource_serviceendpoint_babylonvault.go
index 9c7b8772f..0b4199962 100644
--- a/bblnazuredevops/internal/service/serviceendpoint/resource_serviceendpoint_babylonvault.go
+++ b/bblnazuredevops/internal/service/serviceendpoint/resource_serviceendpoint_babylonvault.go
@@ -2,13 +2,14 @@ package serviceendpoint
import (
"fmt"
+ "github.com/google/uuid"
"strings"
"github.com/babylonhealth/terraform-provider-bblnazuredevops/bblnazuredevops/internal/utils/converter"
"github.com/babylonhealth/terraform-provider-bblnazuredevops/bblnazuredevops/internal/utils/tfhelper"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/validation"
- "github.com/microsoft/azure-devops-go-api/azuredevops/serviceendpoint"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/serviceendpoint"
)
const BABYLON_VAULT_SERVICE_CONNECTION_TYPE string = "babylon-service-endpoint-vault"
@@ -42,7 +43,7 @@ func ResourceServiceEndpointBabylonVault() *schema.Resource {
}
// Convert internal Terraform data structure to an AzDO data structure
-func expandServiceEndpointBabylonVault(d *schema.ResourceData) (*serviceendpoint.ServiceEndpoint, *string, error) {
+func expandServiceEndpointBabylonVault(d *schema.ResourceData) (*serviceendpoint.ServiceEndpoint, *uuid.UUID, error) {
serviceEndpoint, projectID := doBaseExpansion(d)
serviceEndpoint.Authorization = &serviceendpoint.EndpointAuthorization{
Parameters: &map[string]string{},
@@ -55,7 +56,7 @@ func expandServiceEndpointBabylonVault(d *schema.ResourceData) (*serviceendpoint
}
// Convert AzDO data structure to internal Terraform data structure
-func flattenServiceEndpointBabylonVault(d *schema.ResourceData, serviceEndpoint *serviceendpoint.ServiceEndpoint, projectID *string) {
+func flattenServiceEndpointBabylonVault(d *schema.ResourceData, serviceEndpoint *serviceendpoint.ServiceEndpoint, projectID *uuid.UUID) {
doBaseFlattening(d, serviceEndpoint, projectID)
tfhelper.HelpFlattenSecret(d, "password")
diff --git a/bblnazuredevops/internal/service/serviceendpoint/resource_serviceendpoint_babylonvault_test.go b/bblnazuredevops/internal/service/serviceendpoint/resource_serviceendpoint_babylonvault_test.go
index 97503d704..f75adfaa6 100644
--- a/bblnazuredevops/internal/service/serviceendpoint/resource_serviceendpoint_babylonvault_test.go
+++ b/bblnazuredevops/internal/service/serviceendpoint/resource_serviceendpoint_babylonvault_test.go
@@ -1,6 +1,7 @@
package serviceendpoint
import (
+ "github.com/google/uuid"
"testing"
"github.com/babylonhealth/terraform-provider-bblnazuredevops/bblnazuredevops/internal/utils/converter"
@@ -8,7 +9,7 @@ import (
"github.com/hashicorp/go-multierror"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/validation"
- "github.com/microsoft/azure-devops-go-api/azuredevops/serviceendpoint"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/serviceendpoint"
)
func TestResourceServiceEndpointBabylonVault(t *testing.T) {
diff --git a/bblnazuredevops/internal/service/serviceendpoint/resource_serviceendpoint_genericwebhook.go b/bblnazuredevops/internal/service/serviceendpoint/resource_serviceendpoint_genericwebhook.go
index 458760f1b..7475abc4c 100644
--- a/bblnazuredevops/internal/service/serviceendpoint/resource_serviceendpoint_genericwebhook.go
+++ b/bblnazuredevops/internal/service/serviceendpoint/resource_serviceendpoint_genericwebhook.go
@@ -3,8 +3,9 @@ package serviceendpoint
import (
"github.com/babylonhealth/terraform-provider-bblnazuredevops/bblnazuredevops/internal/utils/converter"
"github.com/babylonhealth/terraform-provider-bblnazuredevops/bblnazuredevops/internal/utils/tfhelper"
+ "github.com/google/uuid"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
- "github.com/microsoft/azure-devops-go-api/azuredevops/serviceendpoint"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/serviceendpoint"
)
// ResourceServiceEndpointGenericWebhook schema and implementation for docker registry service endpoint resource
@@ -36,7 +37,7 @@ func ResourceServiceEndpointGenericWebhook() *schema.Resource {
}
// Convert internal Terraform data structure to an AzDO data structure
-func expandServiceEndpointGenericWebhook(d *schema.ResourceData) (*serviceendpoint.ServiceEndpoint, *string, error) {
+func expandServiceEndpointGenericWebhook(d *schema.ResourceData) (*serviceendpoint.ServiceEndpoint, *uuid.UUID, error) {
serviceEndpoint, projectID := doBaseExpansion(d)
serviceEndpoint.Authorization = &serviceendpoint.EndpointAuthorization{
Parameters: &map[string]string{
@@ -53,7 +54,7 @@ func expandServiceEndpointGenericWebhook(d *schema.ResourceData) (*serviceendpoi
}
// Convert AzDO data structure to internal Terraform data structure
-func flattenServiceEndpointGenericWebhook(d *schema.ResourceData, serviceEndpoint *serviceendpoint.ServiceEndpoint, projectID *string) {
+func flattenServiceEndpointGenericWebhook(d *schema.ResourceData, serviceEndpoint *serviceendpoint.ServiceEndpoint, projectID *uuid.UUID) {
doBaseFlattening(d, serviceEndpoint, projectID)
tfhelper.HelpFlattenSecret(d, "password")
diff --git a/bblnazuredevops/internal/service/serviceendpoint/resource_serviceendpoint_genericwebhook_test.go b/bblnazuredevops/internal/service/serviceendpoint/resource_serviceendpoint_genericwebhook_test.go
index 2f21fbfea..1ab400012 100644
--- a/bblnazuredevops/internal/service/serviceendpoint/resource_serviceendpoint_genericwebhook_test.go
+++ b/bblnazuredevops/internal/service/serviceendpoint/resource_serviceendpoint_genericwebhook_test.go
@@ -5,10 +5,11 @@ import (
"github.com/babylonhealth/terraform-provider-bblnazuredevops/bblnazuredevops/internal/utils/converter"
"github.com/babylonhealth/terraform-provider-bblnazuredevops/bblnazuredevops/internal/utils/tfhelper"
"github.com/go-test/deep"
+ "github.com/google/uuid"
"github.com/hashicorp/go-multierror"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/validation"
- "github.com/microsoft/azure-devops-go-api/azuredevops/serviceendpoint"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/serviceendpoint"
"golang.org/x/crypto/bcrypt"
"os"
"testing"
@@ -103,7 +104,7 @@ func Test_expandServiceEndpointGenericWebhook(t *testing.T) {
name string
args args
want *serviceendpoint.ServiceEndpoint
- wantProject *string
+ wantProject *uuid.UUID
wantErr bool
}{
{
@@ -112,7 +113,7 @@ func Test_expandServiceEndpointGenericWebhook(t *testing.T) {
username: "user",
password: "password",
url: "http://http.cat",
- project: "project",
+ project: "3c49c3b6-a06d-424d-a6b6-0cd375ee9261",
},
want: &serviceendpoint.ServiceEndpoint{
Authorization: &serviceendpoint.EndpointAuthorization{
@@ -129,7 +130,7 @@ func Test_expandServiceEndpointGenericWebhook(t *testing.T) {
Url: converter.String("http://http.cat"),
Name: converter.String(""),
},
- wantProject: converter.String("project"),
+ wantProject: converter.UUID("3c49c3b6-a06d-424d-a6b6-0cd375ee9261"),
},
}
for _, tt := range tests {
@@ -183,7 +184,7 @@ func Test_flattenServiceEndpointGenericWebhook(t *testing.T) {
type args struct {
d *schema.ResourceData
serviceEndpoint *serviceendpoint.ServiceEndpoint
- projectID *string
+ projectID *uuid.UUID
}
tests := []struct {
name string
@@ -205,7 +206,7 @@ func Test_flattenServiceEndpointGenericWebhook(t *testing.T) {
Scheme: converter.String("UsernamePassword"),
},
},
- projectID: converter.String("project"),
+ projectID: converter.UUID("3c49c3b6-a06d-424d-a6b6-0cd375ee9261"),
},
expected: map[string]string{
"id": "1ceae7ff-565c-4cdf-9214-6e2246cba764",
@@ -213,7 +214,7 @@ func Test_flattenServiceEndpointGenericWebhook(t *testing.T) {
"authorization.scheme": "UsernamePassword",
"description": "",
"password": "password1",
- "project_id": "project",
+ "project_id": "3c49c3b6-a06d-424d-a6b6-0cd375ee9261",
"service_endpoint_name": "",
"url": "http://http.cat",
"username": "user1",
diff --git a/bblnazuredevops/internal/utils/converter/converter.go b/bblnazuredevops/internal/utils/converter/converter.go
index 838799f8c..dd17e7104 100644
--- a/bblnazuredevops/internal/utils/converter/converter.go
+++ b/bblnazuredevops/internal/utils/converter/converter.go
@@ -10,7 +10,7 @@ import (
"unicode/utf16"
"github.com/google/uuid"
- "github.com/microsoft/azure-devops-go-api/azuredevops/licensing"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/licensing"
)
// String Get a pointer to a string
diff --git a/bblnazuredevops/internal/utils/tfhelper/tfhelper.go b/bblnazuredevops/internal/utils/tfhelper/tfhelper.go
index d016d04f1..9520d7364 100644
--- a/bblnazuredevops/internal/utils/tfhelper/tfhelper.go
+++ b/bblnazuredevops/internal/utils/tfhelper/tfhelper.go
@@ -11,7 +11,7 @@ import (
"github.com/babylonhealth/terraform-provider-bblnazuredevops/bblnazuredevops/internal/utils/secretmemo"
"github.com/hashicorp/go-uuid"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
- "github.com/microsoft/azure-devops-go-api/azuredevops/core"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/core"
)
func calcSecretHashKey(secretKey string) string {
diff --git a/bblnazuredevops/internal/utils/tfhelper/tfhelper_test.go b/bblnazuredevops/internal/utils/tfhelper/tfhelper_test.go
index 3f772dc2c..e1556abb5 100644
--- a/bblnazuredevops/internal/utils/tfhelper/tfhelper_test.go
+++ b/bblnazuredevops/internal/utils/tfhelper/tfhelper_test.go
@@ -10,7 +10,7 @@ import (
"github.com/babylonhealth/terraform-provider-bblnazuredevops/bblnazuredevops/internal/utils/converter"
"github.com/golang/mock/gomock"
"github.com/google/uuid"
- "github.com/microsoft/azure-devops-go-api/azuredevops/core"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/core"
"github.com/stretchr/testify/require"
)
diff --git a/go.mod b/go.mod
index 31b41da79..b89a6e003 100644
--- a/go.mod
+++ b/go.mod
@@ -10,13 +10,16 @@ require (
github.com/golang/mock v1.4.1
github.com/google/go-cmp v0.5.2
github.com/google/uuid v1.1.1
+ github.com/hashicorp/go-getter v1.4.2-0.20200106182914-9813cbd4eb02 // indirect
github.com/hashicorp/go-multierror v1.0.0
github.com/hashicorp/go-uuid v1.0.1
- github.com/hashicorp/terraform v0.12.23
+ github.com/hashicorp/hcl/v2 v2.3.0 // indirect
+ github.com/hashicorp/terraform-config-inspect v0.0.0-20191212124732-c6ae6269b9d7 // indirect
github.com/hashicorp/terraform-plugin-sdk v1.13.1
github.com/microsoft/azure-devops-go-api/azuredevops v1.0.0-b3
+ github.com/microsoft/azure-devops-go-api/azuredevops/v6 v6.0.1
github.com/sirupsen/logrus v1.2.0
github.com/stretchr/testify v1.4.0
golang.org/x/crypto v0.0.0-20200427165652-729f1e841bcc
- gopkg.in/yaml.v2 v2.2.4
+ gopkg.in/yaml.v2 v2.2.4 // indirect
)
diff --git a/go.sum b/go.sum
index e68b2d220..f8610356d 100644
--- a/go.sum
+++ b/go.sum
@@ -5,72 +5,16 @@ cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6A
cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=
cloud.google.com/go v0.45.1 h1:lRi0CHyU+ytlvylOlFKKq0af6JncuyoRh1J+QJBqQx0=
cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc=
-cloud.google.com/go/bigquery v1.0.1 h1:hL+ycaJpVE9M7nLoiXb/Pn10ENE2u+oddxbD8uu0ZVU=
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
-cloud.google.com/go/datastore v1.0.0 h1:Kt+gOPPp2LEPWp8CSfxhsM8ik9CcyE/gYu+0r+RnZvM=
cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
-github.com/Azure/azure-sdk-for-go v35.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
-github.com/Azure/azure-sdk-for-go v36.2.0+incompatible h1:09cv2WoH0g6jl6m2iT+R9qcIPZKhXEL0sbmLhxP895s=
-github.com/Azure/azure-sdk-for-go v36.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
-github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI=
-github.com/Azure/go-autorest/autorest v0.9.2 h1:6AWuh3uWrsZJcNoCHrCF/+g4aKPCU39kaMO6/qrnK/4=
-github.com/Azure/go-autorest/autorest v0.9.2/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI=
-github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0=
-github.com/Azure/go-autorest/autorest/adal v0.8.1-0.20191028180845-3492b2aff503 h1:Hxqlh1uAA8aGpa1dFhDNhll7U/rkWtG8ZItFvRMr7l0=
-github.com/Azure/go-autorest/autorest/adal v0.8.1-0.20191028180845-3492b2aff503/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc=
-github.com/Azure/go-autorest/autorest/azure/cli v0.2.0 h1:pSwNMF0qotgehbQNllUWwJ4V3vnrLKOzHrwDLEZK904=
-github.com/Azure/go-autorest/autorest/azure/cli v0.2.0/go.mod h1:WWTbGPvkAg3I4ms2j2s+Zr5xCGwGqTQh+6M2ZqOczkE=
-github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA=
-github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM=
-github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g=
-github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
-github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
-github.com/Azure/go-autorest/autorest/mocks v0.3.0 h1:qJumjCaCudz+OcqE9/XtEPfvtOjOmKaui4EOpFI6zZc=
-github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM=
-github.com/Azure/go-autorest/autorest/to v0.3.0 h1:zebkZaadz7+wIQYgC7GXaz3Wb28yKYfVkkBKwc38VF8=
-github.com/Azure/go-autorest/autorest/to v0.3.0/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA=
-github.com/Azure/go-autorest/autorest/validation v0.2.0 h1:15vMO4y76dehZSq7pAaOLQxC6dZYsSrj2GQpflyM/L4=
-github.com/Azure/go-autorest/autorest/validation v0.2.0/go.mod h1:3EEqHnBxQGHXRYq3HT1WyXAvT7LLY3tl70hw6tQIbjI=
-github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY=
-github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc=
-github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k=
-github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk=
-github.com/Azure/go-ntlmssp v0.0.0-20180810175552-4a21cbd618b4 h1:pSm8mp0T2OH2CPmPDPtwHPr3VAQaOwVF/JbllOPP4xA=
-github.com/Azure/go-ntlmssp v0.0.0-20180810175552-4a21cbd618b4/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU=
-github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
-github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
-github.com/ChrisTrenkamp/goxpath v0.0.0-20170922090931-c385f95c6022 h1:y8Gs8CzNfDF5AZvjr+5UyGQvQEBL7pwo+v+wX6q9JI8=
-github.com/ChrisTrenkamp/goxpath v0.0.0-20170922090931-c385f95c6022/go.mod h1:nuWgzSkT5PnyOd+272uUmV0dnAnAn42Mk7PiQC5VzN4=
-github.com/QcloudApi/qcloud_sign_golang v0.0.0-20141224014652-e4130a326409 h1:DTQ/38ao/CfXsrK0cSAL+h4R/u0VVvfWLZEOlLwEROI=
-github.com/QcloudApi/qcloud_sign_golang v0.0.0-20141224014652-e4130a326409/go.mod h1:1pk82RBxDY/JZnPQrtqHlUFfCctgdorsd9M06fMynOM=
-github.com/Unknwon/com v0.0.0-20151008135407-28b053d5a292 h1:tuQ7w+my8a8mkwN7x2TSd7OzTjkZ7rAeSyH4xncuAMI=
-github.com/Unknwon/com v0.0.0-20151008135407-28b053d5a292/go.mod h1:KYCjqMOeHpNuTOiFQU6WEcTG7poCJrUs0YgyHNtn1no=
-github.com/abdullin/seq v0.0.0-20160510034733-d5467c17e7af h1:DBNMBMuMiWYu0b+8KMJuWmfCkcxl09JwdlqwDZZ6U14=
-github.com/abdullin/seq v0.0.0-20160510034733-d5467c17e7af/go.mod h1:5Jv4cbFiHJMsVxt52+i0Ha45fjshj6wxYr1r19tB9bw=
github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
github.com/agext/levenshtein v1.2.2 h1:0S/Yg6LYmFJ5stwQeRp6EeOcCbj7xiqQSdNelsXvaqE=
github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
-github.com/agl/ed25519 v0.0.0-20150830182803-278e1ec8e8a6/go.mod h1:WPjqKcmVOxf0XSf3YxCJs6N6AOSrOx3obionmG7T0y0=
-github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412 h1:w1UutsfOrms1J05zt7ISrnJIXKzwaspym5BTKGx93EI=
github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412/go.mod h1:WPjqKcmVOxf0XSf3YxCJs6N6AOSrOx3obionmG7T0y0=
github.com/ahmetb/go-linq v3.0.0+incompatible h1:qQkjjOXKrKOTy83X8OpRmnKflXKQIL/mC/gMVVDMhOA=
github.com/ahmetb/go-linq v3.0.0+incompatible/go.mod h1:PFffvbdbtw+QTB0WKRP0cNht7vnCfnGlEpak/DVg5cY=
-github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc h1:cAKDfWh5VpdgMhJosfJnn5/FoN2SRZ4p7fJNX58YPaU=
-github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
-github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf h1:qet1QNfXsQxTZqLG4oE62mJzwPIB8+Tee4RNCL9ulrY=
-github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
-github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20190329064014-6e358769c32a h1:APorzFpCcv6wtD5vmRWYqNm4N55kbepL7c7kTq9XI6A=
-github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20190329064014-6e358769c32a/go.mod h1:T9M45xf79ahXVelWoOBmH0y4aC1t5kXO5BxwyakgIGA=
-github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20190103054945-8205d1f41e70 h1:FrF4uxA24DF3ARNXVbUin3wa5fDLaB1Cy8mKks/LRz4=
-github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20190103054945-8205d1f41e70/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8=
-github.com/aliyun/aliyun-tablestore-go-sdk v4.1.2+incompatible h1:ABQ7FF+IxSFHDMOTtjCfmMDMHiCq6EsAoCV/9sFinaM=
-github.com/aliyun/aliyun-tablestore-go-sdk v4.1.2+incompatible/go.mod h1:LDQHRZylxvcg8H7wBIDfvO5g/cy4/sz1iucBlc2l3Jw=
-github.com/antchfx/xpath v0.0.0-20190129040759-c8489ed3251e h1:ptBAamGVd6CfRsUtyHD+goy2JGhv1QC32v3gqM8mYAM=
-github.com/antchfx/xpath v0.0.0-20190129040759-c8489ed3251e/go.mod h1:Yee4kTMuNiPYJ7nSNorELQMr1J33uOpXDMByNYhvtNk=
-github.com/antchfx/xquery v0.0.0-20180515051857-ad5b8c7a47b0 h1:JaCC8jz0zdMLk2m+qCCVLLLM/PL93p84w4pK3aJWj60=
-github.com/antchfx/xquery v0.0.0-20180515051857-ad5b8c7a47b0/go.mod h1:LzD22aAzDP8/dyiCKFp31He4m2GPjl0AFyzDtZzUu9M=
github.com/apparentlymart/go-cidr v1.0.1 h1:NmIwLZ/KdsjIUlhf+/Np40atNXm/+lZ5txfTJ/SpF+U=
github.com/apparentlymart/go-cidr v1.0.1/go.mod h1:EBcsNrHc3zQeuaeCeCtQruQm+n9/YjEn/vI25Lg7Gwc=
github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM=
@@ -78,91 +22,30 @@ github.com/apparentlymart/go-dump v0.0.0-20190214190832-042adf3cf4a0 h1:MzVXffFU
github.com/apparentlymart/go-dump v0.0.0-20190214190832-042adf3cf4a0/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM=
github.com/apparentlymart/go-textseg v1.0.0 h1:rRmlIsPEEhUTIKQb7T++Nz/A5Q6C9IuX2wFoYVvnCs0=
github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk=
-github.com/apparentlymart/go-versions v0.0.2-0.20180815153302-64b99f7cb171 h1:19Seu/H5gq3Ugtx+CGenwF89SDG3S1REX5i6PJj3RK4=
-github.com/apparentlymart/go-versions v0.0.2-0.20180815153302-64b99f7cb171/go.mod h1:JXY95WvQrPJQtudvNARshgWajS7jNNlM90altXIPNyI=
-github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2 h1:7Ip0wMmLHLRJdrloDxZfhMm0xrLXZS8+COSu2bXmEQs=
-github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
-github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da h1:8GUt8eRujhVEGZFFEjBj46YV4rDjvGrNxb0KMWYkL2I=
-github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI=
github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/aws/aws-sdk-go v1.15.78/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM=
github.com/aws/aws-sdk-go v1.25.3 h1:uM16hIw9BotjZKMZlX05SN2EFtaWfi/NonPKIARiBLQ=
github.com/aws/aws-sdk-go v1.25.3/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
-github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f h1:ZNv7On9kyUzm7fvRZumSyy/IUiSC7AzL0I1jKKtwooA=
-github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc=
-github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0=
-github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas=
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4=
github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY=
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
-github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ=
-github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
-github.com/bmatcuk/doublestar v1.1.5 h1:2bNwBOmhyFEFcoB3tGvTD5xanq+4kyOZlB8wFYbMjkk=
-github.com/bmatcuk/doublestar v1.1.5/go.mod h1:wiQtGV+rzVYxB7WIlirSN++5HPtPlXEo9MEoZQC/PmE=
-github.com/boltdb/bolt v1.3.1 h1:JQmyP4ZBrce+ZQu0dY660FMfatumYDLun9hBCUVIkF4=
-github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps=
-github.com/census-instrumentation/opencensus-proto v0.2.1 h1:glEXhBS5PSLLv4IXzLA5yPRVX4bilULVyxxbrfOtDAk=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
-github.com/cheggaaa/pb v1.0.27 h1:wIkZHkNfC7R6GI5w7l/PdAdzXzlrbcI3p8OAlnkTsnc=
github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s=
-github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE=
-github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
-github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8=
-github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
-github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 h1:q763qf9huN11kDQavWsoZXJNW3xEE4JJyHa5Q25/sd8=
-github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
-github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
-github.com/coreos/bbolt v1.3.0 h1:HIgH5xUWXT914HCI671AxuTTqjj64UOFr7pHn48LUTI=
-github.com/coreos/bbolt v1.3.0/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
-github.com/coreos/etcd v3.3.10+incompatible h1:jFneRYjIvLMLhDLCzuTuU4rSJUjRplcJQ7pD7MnhC04=
-github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
-github.com/coreos/go-semver v0.2.0 h1:3Jm3tLmsgAYcjC+4Up7hJrFBPr+n7rAqYeSw/SZazuY=
-github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
-github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d h1:t5Wuyh53qYyg9eqn4BbnlIT+vmhyww0TatL+zT3uWgI=
-github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
-github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg=
-github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
-github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
-github.com/dimchansky/utfbom v1.1.0 h1:FcM3g+nofKgUteL8dm/UpdRXNC9KmADgTpLKsu0TRo4=
-github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8=
-github.com/dnaeon/go-vcr v0.0.0-20180920040454-5637cf3d8a31 h1:Dzuw9GtbmllUqEcoHfScT9YpKFUssSiZ5PgZkIGf/YQ=
-github.com/dnaeon/go-vcr v0.0.0-20180920040454-5637cf3d8a31/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E=
-github.com/dylanmei/iso8601 v0.1.0 h1:812NGQDBcqquTfH5Yeo7lwR0nzx/cKdsmf3qMjPURUI=
-github.com/dylanmei/iso8601 v0.1.0/go.mod h1:w9KhXSgIyROl1DefbMYIE7UVSIvELTbMrCfx+QkYnoQ=
-github.com/dylanmei/winrmtest v0.0.0-20190225150635-99b7fe2fddf1 h1:r1oACdS2XYiAWcfF8BJXkoU8l1J71KehGR+d99yWEDA=
-github.com/dylanmei/winrmtest v0.0.0-20190225150635-99b7fe2fddf1/go.mod h1:lcy9/2gH1jn/VCLouHA6tOEwLoNVd4GW6zhuKLmHC2Y=
-github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473 h1:4cmBvAEBNJaGARUEs3/suWRyfyBfhf7I60WBZq+bv2w=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
-github.com/envoyproxy/protoc-gen-validate v0.1.0 h1:EQciDnbrYxy13PgWoY8AqoxGiPrpgBZ1R8UNe3ddc+A=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
-github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
-github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
-github.com/go-kit/kit v0.8.0 h1:Wz+5lgoB0kkuqLEc6NVmwRknTKP6dTGbSqvhZtBI/j0=
-github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
-github.com/go-logfmt/logfmt v0.3.0 h1:8HUsc87TaSWLKwrnumgC8/YconD2fJQsRJAsWaPg2ic=
-github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
-github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk=
-github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
-github.com/go-test/deep v1.0.1/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA=
github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68=
github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA=
-github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
-github.com/gogo/protobuf v1.2.0 h1:xU6/SpYbvkNYiptHJYEDRseDLvYE7wSqhYYNy0QSUzI=
-github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
-github.com/golang/groupcache v0.0.0-20180513044358-24b0969c4cb7 h1:u4bArs140e9+AfE52mFHOXVFnOSBJBRlzTHrOPLOIhE=
-github.com/golang/groupcache v0.0.0-20180513044358-24b0969c4cb7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
@@ -175,54 +58,25 @@ github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
github.com/golang/protobuf v1.3.4 h1:87PNWwrRvUSnqS4dlcBU/ftvOIBep4sYuBLlh6rX2wk=
github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
-github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
-github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4=
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
-github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
-github.com/google/go-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM=
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk=
-github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
-github.com/google/pprof v0.0.0-20190515194954-54271f7e092f h1:Jnx61latede7zDD3DiiP4gmNz33uK0U5HDUaF0a/HVQ=
github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM=
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
-github.com/gophercloud/gophercloud v0.0.0-20190208042652-bc37892e1968 h1:Pu+HW4kcQozw0QyrTTgLE+3RXNqFhQNNzhbnoLFL83c=
-github.com/gophercloud/gophercloud v0.0.0-20190208042652-bc37892e1968/go.mod h1:3WdhXV3rUYy9p6AUW8d94kr+HS62Y4VL9mBnFxsD8q4=
-github.com/gophercloud/utils v0.0.0-20190128072930-fbb6ab446f01 h1:OgCNGSnEalfkRpn//WGJHhpo7fkP+LhTpvEITZ7CkK4=
-github.com/gophercloud/utils v0.0.0-20190128072930-fbb6ab446f01/go.mod h1:wjDF8z83zTeg5eMLml5EBSlAhbF7G8DobyI1YsMuyzw=
-github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
-github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
-github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q=
-github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
-github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 h1:Iju5GlWwrvL6UBg4zJJt3btmonfrMlCDdsejg4CZE7c=
-github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
-github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=
-github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
-github.com/grpc-ecosystem/grpc-gateway v1.8.5 h1:2+KSC78XiO6Qy0hIjfc1OD9H+hsaJdJlb8Kqsd41CTE=
-github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
-github.com/hashicorp/aws-sdk-go-base v0.4.0 h1:zH9hNUdsS+2G0zJaU85ul8D59BGnZBaKM+KMNPAHGwk=
-github.com/hashicorp/aws-sdk-go-base v0.4.0/go.mod h1:eRhlz3c4nhqxFZJAahJEFL7gh6Jyj5rQmQc7F9eHFyQ=
-github.com/hashicorp/consul v0.0.0-20171026175957-610f3c86a089 h1:1eDpXAxTh0iPv+1kc9/gfSI2pxRERDsTk/lNGolwHn8=
-github.com/hashicorp/consul v0.0.0-20171026175957-610f3c86a089/go.mod h1:mFrjN1mfidgJfYP1xrJCF+AfRhr6Eaqhb2+sfyn/OOI=
github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
-github.com/hashicorp/go-azure-helpers v0.10.0 h1:KhjDnQhCqEMKlt4yH00MCevJQPJ6LkHFdSveXINO6vE=
-github.com/hashicorp/go-azure-helpers v0.10.0/go.mod h1:YuAtHxm2v74s+IjQwUG88dHBJPd5jL+cXr5BGVzSKhE=
-github.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3mlgcqk5mU=
-github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg=
github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM=
github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
@@ -230,31 +84,14 @@ github.com/hashicorp/go-getter v1.4.0/go.mod h1:7qxyCd8rBfcShwsvxgIguu4KbS3l8bUC
github.com/hashicorp/go-getter v1.4.2-0.20200106182914-9813cbd4eb02 h1:l1KB3bHVdvegcIf5upQ5mjcHjs2qsWnKh4Yr9xgIuu8=
github.com/hashicorp/go-getter v1.4.2-0.20200106182914-9813cbd4eb02/go.mod h1:7qxyCd8rBfcShwsvxgIguu4KbS3l8bUCwg2Umn7RjeY=
github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI=
-github.com/hashicorp/go-hclog v0.0.0-20181001195459-61d530d6c27f/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
github.com/hashicorp/go-hclog v0.9.2 h1:CG6TE5H9/JXsFWJCfoIVpKFIkFe6ysEuHirp4DxCsHI=
github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
-github.com/hashicorp/go-immutable-radix v0.0.0-20180129170900-7f3cd4390caa h1:0nA8i+6Rwqaq9xlpmVxxTwk6rxiEhX+E6Wh4vPNHiS8=
-github.com/hashicorp/go-immutable-radix v0.0.0-20180129170900-7f3cd4390caa/go.mod h1:6ij3Z20p+OhOkCSrA0gImAWoHYQRGbnlcuk6XYTiaRw=
-github.com/hashicorp/go-msgpack v0.5.4 h1:SFT72YqIkOcLdWJUYcriVX7hbrZpwc/f7h8aW2NUqrA=
-github.com/hashicorp/go-msgpack v0.5.4/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o=
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
-github.com/hashicorp/go-plugin v1.0.1-0.20190610192547-a1bc61569a26/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY=
github.com/hashicorp/go-plugin v1.0.1 h1:4OtAfUGbnKC6yS48p0CtMX2oFYtzFZVv6rok3cRWgnE=
github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY=
-github.com/hashicorp/go-retryablehttp v0.5.2 h1:AoISa4P4IsW0/m4T6St8Yw38gTl5GtBAgfkhYh1xAz4=
-github.com/hashicorp/go-retryablehttp v0.5.2/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs=
-github.com/hashicorp/go-rootcerts v1.0.0 h1:Rqb66Oo1X/eSV1x66xbDccZjhJigjg0+e82kpwzSwCI=
-github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU=
github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo=
github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I=
-github.com/hashicorp/go-slug v0.4.1 h1:/jAo8dNuLgSImoLXaX7Od7QB4TfYCVPam+OpAt5bZqc=
-github.com/hashicorp/go-slug v0.4.1/go.mod h1:I5tq5Lv0E2xcNXNkmx7BSfzi1PsJ2cNjs3cC3LwyhK8=
-github.com/hashicorp/go-sockaddr v0.0.0-20180320115054-6d291a969b86 h1:7YOlAIO2YWnJZkQp7B5eFykaIY7C9JndqAFQyVV5BhM=
-github.com/hashicorp/go-sockaddr v0.0.0-20180320115054-6d291a969b86/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=
-github.com/hashicorp/go-tfe v0.3.27 h1:7XZ/ZoPyYoeuNXaWWW0mJOq016y0qb7I4Q0P/cagyu8=
-github.com/hashicorp/go-tfe v0.3.27/go.mod h1:DVPSW2ogH+M9W1/i50ASgMht8cHP7NxxK0nrY9aFikQ=
-github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE=
github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
@@ -268,16 +105,8 @@ github.com/hashicorp/hcl v0.0.0-20170504190234-a4b07c25de5f/go.mod h1:oZtUIOe8dh
github.com/hashicorp/hcl/v2 v2.0.0/go.mod h1:oVVDG71tEinNGYCxinCYadcmKU9bglqW9pV3txagJ90=
github.com/hashicorp/hcl/v2 v2.3.0 h1:iRly8YaMwTBAKhn1Ybk7VSdzbnopghktCD031P8ggUE=
github.com/hashicorp/hcl/v2 v2.3.0/go.mod h1:d+FwDBbOLvpAM3Z6J7gPj/VoAGkNe/gm352ZhjJ/Zv8=
-github.com/hashicorp/hil v0.0.0-20190212112733-ab17b08d6590 h1:2yzhWGdgQUWZUCNK+AoO35V+HTsgEmcM4J9IkArh7PI=
-github.com/hashicorp/hil v0.0.0-20190212112733-ab17b08d6590/go.mod h1:n2TSygSNwsLJ76m8qFXTSc7beTb+auJxYdqrnoqwZWE=
github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y=
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
-github.com/hashicorp/memberlist v0.1.0 h1:qSsCiC0WYD39lbSitKNt40e30uorm2Ss/d4JGU1hzH8=
-github.com/hashicorp/memberlist v0.1.0/go.mod h1:ncdBp14cuox2iFOq3kDiquKU6fqsTBc3W6JvZwjxxsE=
-github.com/hashicorp/serf v0.0.0-20160124182025-e4ec8cc423bb h1:ZbgmOQt8DOg796figP87/EFCVx2v2h9yRvwHF/zceX4=
-github.com/hashicorp/serf v0.0.0-20160124182025-e4ec8cc423bb/go.mod h1:h/Ru6tmZazX7WO/GDmwdpS975F019L4t5ng5IgwbNrE=
-github.com/hashicorp/terraform v0.12.23 h1:3fTWHq6JkHk4VJ8Z6A+8MvvAVtlSXbXViPJSWLuSNAk=
-github.com/hashicorp/terraform v0.12.23/go.mod h1:eJcloDEx5ywM4a1tetIuVrlqklM0bUVRYJBYAh4CYzA=
github.com/hashicorp/terraform-config-inspect v0.0.0-20191115094559-17f92b0546e8/go.mod h1:p+ivJws3dpqbp1iP84+npOyAmTTOLMgCzrXd3GSdn/A=
github.com/hashicorp/terraform-config-inspect v0.0.0-20191212124732-c6ae6269b9d7 h1:Pc5TCv9mbxFN6UVX0LH6CpQrdTM5YjbVI2w15237Pjk=
github.com/hashicorp/terraform-config-inspect v0.0.0-20191212124732-c6ae6269b9d7/go.mod h1:p+ivJws3dpqbp1iP84+npOyAmTTOLMgCzrXd3GSdn/A=
@@ -289,60 +118,24 @@ github.com/hashicorp/terraform-plugin-test v1.3.0 h1:hU5LoxrOn9qvOo+LTKN6mSav2J+
github.com/hashicorp/terraform-plugin-test v1.3.0/go.mod h1:QIJHYz8j+xJtdtLrFTlzQVC0ocr3rf/OjIpgZLK56Hs=
github.com/hashicorp/terraform-svchost v0.0.0-20191011084731-65d371908596 h1:hjyO2JsNZUKT1ym+FAdlBEkGPevazYsmVgIMw7dVELg=
github.com/hashicorp/terraform-svchost v0.0.0-20191011084731-65d371908596/go.mod h1:kNDNcF7sN4DocDLBkQYz73HGKwN1ANB1blq4lIYLYvg=
-github.com/hashicorp/vault v0.10.4 h1:4x0lHxui/ZRp/B3E0Auv1QNBJpzETqHR2kQD3mHSBJU=
-github.com/hashicorp/vault v0.10.4/go.mod h1:KfSyffbKxoVyspOdlaGVjIuwLobi07qD1bAbosPMpP0=
github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d h1:kJCB4vdITiW1eC1vq2e6IsrXKrZit1bv/TDYFGMp4BQ=
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=
github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM=
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
-github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo=
-github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
-github.com/joyent/triton-go v0.0.0-20180313100802-d8f9c0314926 h1:kie3qOosvRKqwij2HGzXWffwpXvcqfPPXRUw8I4F/mg=
-github.com/joyent/triton-go v0.0.0-20180313100802-d8f9c0314926/go.mod h1:U+RSyWxWd04xTqnuOQxnai7XGS2PrPY2cfGoDKtMHjA=
-github.com/json-iterator/go v1.1.5 h1:gL2yXlmiIo4+t+y32d4WGwOjKGYcGOuyrg46vadswDE=
-github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
-github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024 h1:rBMNdlhTLzJjJSDIjNEXX1Pz3Hmwmz91v+zycvx9PJc=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
-github.com/jtolds/gls v4.2.1+incompatible h1:fSuqC+Gmlu6l/ZYAoZzx2pyucC8Xza35fpRVWLVmUEE=
-github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
-github.com/julienschmidt/httprouter v1.2.0 h1:TDTW5Yz1mjftljbcKqRcrYhd4XeOoI98t+9HbQbYf7g=
-github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
-github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 h1:iQTw/8FWTuc7uiaSepXwyf3o52HaUYcV+Tu66S3F5GA=
-github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8=
-github.com/keybase/go-crypto v0.0.0-20161004153544-93f5b35093ba h1:NARVGAAgEXvoMeNPHhPFt1SBt1VMznA3Gnz9d0qj+co=
github.com/keybase/go-crypto v0.0.0-20161004153544-93f5b35093ba/go.mod h1:ghbZscTyKdM07+Fw3KSi0hcJm+AlEUWj8QLlPtijN/M=
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
-github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY=
-github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
-github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k=
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
-github.com/lib/pq v1.0.0 h1:X5PMW56eZitiTeO7tKzZxFCSpbFZJtkMMooicw2us9A=
-github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
-github.com/likexian/gokit v0.0.0-20190309162924-0a377eecf7aa/go.mod h1:QdfYv6y6qPA9pbBA2qXtoT8BMKha6UyNbxWGWl/9Jfk=
-github.com/likexian/gokit v0.0.0-20190418170008-ace88ad0983b/go.mod h1:KKqSnk/VVSW8kEyO2vVCXoanzEutKdlBAPohmGXkxCk=
-github.com/likexian/gokit v0.0.0-20190501133040-e77ea8b19cdc/go.mod h1:3kvONayqCaj+UgrRZGpgfXzHdMYCAO0KAt4/8n0L57Y=
-github.com/likexian/gokit v0.20.15 h1:DgtIqqTRFqtbiLJFzuRESwVrxWxfs8OlY6hnPYBa3BM=
-github.com/likexian/gokit v0.20.15/go.mod h1:kn+nTv3tqh6yhor9BC4Lfiu58SmH8NmQ2PmEl+uM6nU=
-github.com/likexian/simplejson-go v0.0.0-20190409170913-40473a74d76d/go.mod h1:Typ1BfnATYtZ/+/shXfFYLrovhFyuKvzwrdOnIDHlmg=
-github.com/likexian/simplejson-go v0.0.0-20190419151922-c1f9f0b4f084/go.mod h1:U4O1vIJvIKwbMZKUJ62lppfdvkCdVd2nfMimHK81eec=
-github.com/likexian/simplejson-go v0.0.0-20190502021454-d8787b4bfa0b h1:tNa5q0zLsg6EzUI4npXeUYwk/xuTtMcKdVnRsYdOHzk=
-github.com/likexian/simplejson-go v0.0.0-20190502021454-d8787b4bfa0b/go.mod h1:3BWwtmKP9cXWwYCr5bkoVDEfLywacOv0s06OBEDpyt8=
-github.com/lusis/go-artifactory v0.0.0-20160115162124-7e4ce345df82 h1:wnfcqULT+N2seWf6y4yHzmi7GD2kNx4Ute0qArktD48=
-github.com/lusis/go-artifactory v0.0.0-20160115162124-7e4ce345df82/go.mod h1:y54tfGmO3NKssKveTEFFzH8C/akrSOy/iW9qEAUDV84=
-github.com/masterzen/simplexml v0.0.0-20160608183007-4572e39b1ab9 h1:SmVbOZFWAlyQshuMfOkiAx1f5oUTsOGG5IXplAEYeeM=
-github.com/masterzen/simplexml v0.0.0-20160608183007-4572e39b1ab9/go.mod h1:kCEbxUJlNDEBNbdQMkPSp6yaKcRXVI6f4ddk8Riv4bc=
-github.com/masterzen/winrm v0.0.0-20190223112901-5e5c9a7fe54b h1:/1RFh2SLCJ+tEnT73+Fh5R2AO89sQqs8ba7o+hx1G0Y=
-github.com/masterzen/winrm v0.0.0-20190223112901-5e5c9a7fe54b/go.mod h1:wr1VqkwW0AB5JS0QLy5GpVMS9E3VtRoSYXUYyVk46KY=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-colorable v0.1.1 h1:G1f5SKeVxmagw/IyvzvtZE4Gybcc4Tr1tf7I8z0XgOg=
github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=
@@ -350,16 +143,11 @@ github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNx
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/mattn/go-isatty v0.0.5 h1:tHXDdz1cpzGaovsTB+TVB8q90WEokoVmfMqoVcrLUgw=
github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
-github.com/mattn/go-runewidth v0.0.4 h1:2BvfKmzob6Bmd4YsL0zygOqfdFnK7GR4QL06Do4/p7Y=
github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
-github.com/mattn/go-shellwords v1.0.4 h1:xmZZyxuP+bYKAKkA9ABYXVNJ+G/Wf3R8d8vAP3LDJJk=
-github.com/mattn/go-shellwords v1.0.4/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o=
-github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
-github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/microsoft/azure-devops-go-api/azuredevops v1.0.0-b3 h1:5iyKm9Mzp0NbKLVHP6PZbigCAzvOYq/pAaMyc8KpNLs=
github.com/microsoft/azure-devops-go-api/azuredevops v1.0.0-b3/go.mod h1:PoGiBqKSQK1vIfQ+yVaFcGjDySHvym6FM1cNYnwzbrY=
-github.com/miekg/dns v1.0.8 h1:Zi8HNpze3NeRWH1PQV6O71YcvJRQ6j0lORO6DAEmAAI=
-github.com/miekg/dns v1.0.8/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
+github.com/microsoft/azure-devops-go-api/azuredevops/v6 v6.0.1 h1:ACnM5CwgTH6OSQHErzZDrotEG0rffPdJxtF/WOWglAw=
+github.com/microsoft/azure-devops-go-api/azuredevops/v6 v6.0.1/go.mod h1:1bdoUWt0f/xMYxDzy6FwSvDBxBzJmw99HV//P7b4cyE=
github.com/mitchellh/cli v1.0.0 h1:iGBIsUe3+HZ/AD/Vd7DErOt5sU9fa8Uj7A2s1aggv1Y=
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db h1:62I3jR2EmQ4l5rM/4FEfDWcRD+abF5XlKShorW5LRoQ=
@@ -369,116 +157,45 @@ github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFW
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
-github.com/mitchellh/go-linereader v0.0.0-20190213213312-1b945b3263eb h1:GRiLv4rgyqjqzxbhJke65IYUf4NCOOvrPOJbV/sPxkM=
-github.com/mitchellh/go-linereader v0.0.0-20190213213312-1b945b3263eb/go.mod h1:OaY7UOoTkkrX3wRwjpYRKafIkkyeD0UtweSHAWWiqQM=
github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0=
github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo=
github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4=
github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo=
-github.com/mitchellh/hashstructure v1.0.0 h1:ZkRJX1CyOoTkar7p/mLS5TZU4nJ1Rn/F8u9dGS02Q3Y=
-github.com/mitchellh/hashstructure v1.0.0/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ=
github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
-github.com/mitchellh/panicwrap v1.0.0 h1:67zIyVakCIvcs69A0FGfZjBdPleaonSgGlXRSRlb6fE=
-github.com/mitchellh/panicwrap v1.0.0/go.mod h1:pKvZHwWrZowLUzftuFq7coarnxbBXU4aQh3N0BJOeeA=
-github.com/mitchellh/prefixedio v0.0.0-20190213213902-5733675afd51 h1:eD92Am0Qf3rqhsOeA1zwBHSfRkoHrt4o6uORamdmJP8=
-github.com/mitchellh/prefixedio v0.0.0-20190213213902-5733675afd51/go.mod h1:kB1naBgV9ORnkiTVeyJOI1DavaJkG4oNIq0Af6ZVKUo=
github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
github.com/mitchellh/reflectwalk v1.0.1 h1:FVzMWA5RllMAKIdUSC8mdWo3XtwoecrH79BY70sEEpE=
github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
-github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
-github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
-github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=
-github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
-github.com/mozillazg/go-httpheader v0.2.1 h1:geV7TrjbL8KXSyvghnFm+NyTux/hxwueTSrwhe88TQQ=
-github.com/mozillazg/go-httpheader v0.2.1/go.mod h1:jJ8xECTlalr6ValeXYdOF8fFUISeBAdw6E61aqQma60=
-github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223 h1:F9x/1yl3T2AeKLr2AMdilSD8+f9bvMnNN8VS5iDtovc=
-github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
-github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d h1:VhgPp6v9qf9Agr/56bj7Y/xa04UccTW04VP0Qed4vnQ=
-github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d/go.mod h1:YUTz3bUH2ZwIWBy3CJBeOBEugqcmXREj14T+iG/4k4U=
github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw=
github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=
-github.com/packer-community/winrmcp v0.0.0-20180102160824-81144009af58 h1:m3CEgv3ah1Rhy82L+c0QG/U3VyY1UsvsIdkh0/rU97Y=
-github.com/packer-community/winrmcp v0.0.0-20180102160824-81144009af58/go.mod h1:f6Izs6JvFTdnRbziASagjZ2vmf55NSIkC/weStxCHqk=
-github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c h1:Lgl0gzECD8GnQ5QCWA8o6BtfL6mDH5rQgM4/fX3avOs=
-github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
-github.com/pierrec/lz4 v2.0.5+incompatible h1:2xWsjqPFWcplujydGg4WmhC/6fZqK42wMM8aXeqhl0I=
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
-github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4 h1:49lOXmGaUpV9Fz3gd7TFZY106KVlPVa5jcYD1gaQf98=
-github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA=
-github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw=
-github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
github.com/posener/complete v1.2.1 h1:LrvDIY//XNo65Lq84G/akBuMGlawHvGBABv8f/ZN6DI=
github.com/posener/complete v1.2.1/go.mod h1:6gapUrK/U1TAN7ciCoNRIdVC5sbdBTUh1DKN0g6uH7E=
-github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
-github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829 h1:D+CiwcpGTW6pL6bv6KI3KbyEyCKyS+1JWS2h8PNDnGA=
-github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs=
-github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
-github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
-github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
-github.com/prometheus/common v0.2.0 h1:kUZDBDTdBVBYBj5Tmh2NZLlF60mfjA27rM34b+cVwNU=
-github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
-github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
-github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1 h1:/K3IL0Z1quvmJ7X0A1AwNEK7CRkVK3YwfOU/QAL4WGg=
-github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
-github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af h1:gu+uRPtBe88sKxUCEXRoeCvVG90TJmwhiqRpvdhQFng=
-github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
-github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww=
-github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
-github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I=
-github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
github.com/sirupsen/logrus v1.2.0 h1:juTguoYk5qI21pwyTXY3B3Y5cOTH3ZUyZCg1v/mihuo=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
-github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=
-github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
-github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a h1:JSvGDIbmil4Ui/dDdFBExb7/cmkNjyX5F97oglmvCDo=
-github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s=
-github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E=
-github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
-github.com/spf13/afero v1.2.1/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc=
github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
-github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg=
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
-github.com/svanharmelen/jsonapi v0.0.0-20180618144545-0c0828c3f16d h1:Z4EH+5EffvBEhh37F0C0DnpklTMh00JOkjW5zK3ofBI=
-github.com/svanharmelen/jsonapi v0.0.0-20180618144545-0c0828c3f16d/go.mod h1:BSTlc8jOjh0niykqEGVXOLXdi9o0r0kR8tCYiMvjFgw=
-github.com/tencentcloud/tencentcloud-sdk-go v3.0.82+incompatible h1:5Td2b0yfaOvw9M9nZ5Oav6Li9bxUNxt4DgxMfIPpsa0=
-github.com/tencentcloud/tencentcloud-sdk-go v3.0.82+incompatible/go.mod h1:0PfYow01SHPMhKY31xa+EFz2RStxIqj6JFAJS+IkCi4=
-github.com/tencentyun/cos-go-sdk-v5 v0.0.0-20190808065407-f07404cefc8c h1:iRD1CqtWUjgEVEmjwTMbP1DMzz1HRytOsgx/rlw/vNs=
-github.com/tencentyun/cos-go-sdk-v5 v0.0.0-20190808065407-f07404cefc8c/go.mod h1:wk2XFUg6egk4tSDNZtXeKfe2G6690UVyt163PuUxBZk=
-github.com/terraform-providers/terraform-provider-openstack v1.15.0 h1:adpjqej+F8BAX9dHmuPF47sUIkgifeqBu6p7iCsyj0Y=
-github.com/terraform-providers/terraform-provider-openstack v1.15.0/go.mod h1:2aQ6n/BtChAl1y2S60vebhyJyZXBsuAI5G4+lHrT1Ew=
-github.com/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6 h1:lYIiVDtZnyTWlNwiAxLj0bbpTcx1BWCFhXjfsvmPdNc=
-github.com/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
-github.com/ugorji/go v0.0.0-20180813092308-00b869d2f4a5 h1:cMjKdf4PxEBN9K5HaD9UMW8gkTbM0kMzkTa9SJe0WNQ=
-github.com/ugorji/go v0.0.0-20180813092308-00b869d2f4a5/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ=
github.com/ulikunitz/xz v0.5.5 h1:pFrO0lVpTBXLpYw+pnLj6TbvHuyjXMfjGeCwSqCVwok=
github.com/ulikunitz/xz v0.5.5/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8=
github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
github.com/vmihailenco/msgpack v4.0.1+incompatible h1:RMF1enSPeKTlXrXdOcqjFUElywVZjjC6pqse21bKbEU=
github.com/vmihailenco/msgpack v4.0.1+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
-github.com/xanzy/ssh-agent v0.2.1 h1:TCbipTQL2JiiCprBWx9frJ2eJlCYT00NmctrHxVAr70=
-github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4=
-github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18 h1:MPPkRncZLN9Kh4MEFmbnK4h3BD7AUmskWv2+EeZJCCs=
-github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
-github.com/xlab/treeprint v0.0.0-20161029104018-1d6e34225557 h1:Jpn2j6wHkC9wJv5iMfJhKqrZJx3TahFx+7sbZ7zQdxs=
-github.com/xlab/treeprint v0.0.0-20161029104018-1d6e34225557/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg=
github.com/zclconf/go-cty v1.0.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s=
github.com/zclconf/go-cty v1.1.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s=
github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8=
@@ -489,42 +206,26 @@ github.com/zclconf/go-cty-yaml v1.0.1/go.mod h1:IP3Ylp0wQpYm50IHK8OZWKMu6sPJIUgK
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
go.opencensus.io v0.22.0 h1:C9hSCOW830chIVkdja34wa6Ky+IzWllkUinR+BtRZd4=
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
-go.uber.org/atomic v1.3.2 h1:2Oa65PReHzfn29GpvgsYwloV9AVFHPDk8tYxt2c2tr4=
-go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
-go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI=
-go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
-go.uber.org/zap v1.9.1 h1:XCJQEf3W6eZaVwhRBof6ImoYGJSITeKWsyeh3HFu/5o=
-go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
-golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
-golang.org/x/crypto v0.0.0-20190222235706-ffb98f73852f/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200427165652-729f1e841bcc h1:ZGI/fILM2+ueot/UixBSoj9188jCAxVHEZEGhqq67I4=
golang.org/x/crypto v0.0.0-20200427165652-729f1e841bcc/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
-golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522 h1:OeRHuibLsmZkFj773W4LcfAGsSxJgfPONhr8cmO+eLA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
-golang.org/x/image v0.0.0-20190227222117-0694c2d4d067 h1:KYGJGHOQy8oSi1fDlSpcZF0+juKwk/hEMv5SiwHogR0=
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
-golang.org/x/lint v0.0.0-20190409202823-959b441ac422 h1:QzoH/1pFpZguR8NrRHLcO6jKqfv2zpuSqZLgdm7ZmjI=
golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
-golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6 h1:Tus/Y4w3V77xDsGwKUC8a/QrV7jScpU557J77lFffNs=
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
@@ -543,16 +244,12 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190221075227-b4e8571b14e0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -561,7 +258,6 @@ golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190804053845-51ab0e2deafa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527 h1:uYVVQ9WP/Ds2ROhcaGPeIdVq0RIXVLwsHlnvJ+cT1So=
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -570,7 +266,6 @@ golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
-golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
@@ -582,7 +277,6 @@ golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBn
golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
-golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0 h1:Dh6fw+p6FyRl5x/FvNswO1ji0lIGzm3KP8Y9VkS9PTE=
golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -613,30 +307,17 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.27.1 h1:zvIju4sqAGvwKspUQOhwnpcqSbzi7/H6QomNNjTL4sk=
google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
-gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc=
-gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/cheggaaa/pb.v1 v1.0.27 h1:kJdccidYzt3CaHD1crCFTS1hxyhSi059NhOFUf03YFo=
gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
-gopkg.in/ini.v1 v1.42.0 h1:7N3gPTt50s8GuLortA00n8AqRTk75qOP98+mTPpgzRk=
-gopkg.in/ini.v1 v1.42.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
-gopkg.in/resty.v1 v1.12.0 h1:CuXP0Pjfw9rOuY6EP+UvtNvt5DSqHpIxILZKT/quCZI=
-gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
-gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
-gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
-honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc h1:/hemPrYIhOhy8zYrNj+069zDB68us2sMGsfkFJO0iZs=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
-rsc.io/binaryregexp v0.2.0 h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
-rsc.io/quote/v3 v3.1.0 h1:9JKUTTIUgS6kzR9mK1YuGKv6Nl+DijDNIc0ghT58FaY=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
-rsc.io/sampler v1.3.0 h1:7uVkIFmeBqHfdjD+gZwtXXI+RODJ2Wc4O7MPEh/QiW4=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/LICENSE b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/LICENSE
new file mode 100644
index 000000000..4b1ad51b2
--- /dev/null
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/LICENSE
@@ -0,0 +1,21 @@
+ MIT License
+
+ Copyright (c) Microsoft Corporation. All rights reserved.
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/accounts/client.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/accounts/client.go
similarity index 89%
rename from vendor/github.com/microsoft/azure-devops-go-api/azuredevops/accounts/client.go
rename to vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/accounts/client.go
index c0f80127d..f36a3ae11 100644
--- a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/accounts/client.go
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/accounts/client.go
@@ -11,7 +11,7 @@ package accounts
import (
"context"
"github.com/google/uuid"
- "github.com/microsoft/azure-devops-go-api/azuredevops"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6"
"net/http"
"net/url"
)
@@ -19,7 +19,7 @@ import (
var ResourceAreaId, _ = uuid.Parse("0d55247a-1c47-4462-9b1f-5e2125590ee6")
type Client interface {
- // Get a list of accounts for a specific owner or a specific member.
+ // Get a list of accounts for a specific owner or a specific member. One of the following parameters is required: ownerId, memberId.
GetAccounts(context.Context, GetAccountsArgs) (*[]Account, error)
}
@@ -37,7 +37,7 @@ func NewClient(ctx context.Context, connection *azuredevops.Connection) (Client,
}, nil
}
-// Get a list of accounts for a specific owner or a specific member.
+// Get a list of accounts for a specific owner or a specific member. One of the following parameters is required: ownerId, memberId.
func (client *ClientImpl) GetAccounts(ctx context.Context, args GetAccountsArgs) (*[]Account, error) {
queryParams := url.Values{}
if args.OwnerId != nil {
@@ -50,7 +50,7 @@ func (client *ClientImpl) GetAccounts(ctx context.Context, args GetAccountsArgs)
queryParams.Add("properties", *args.Properties)
}
locationId, _ := uuid.Parse("229a6a53-b428-4ffb-a835-e8f36b5b4b1e")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", nil, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", nil, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/accounts/models.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/accounts/models.go
similarity index 98%
rename from vendor/github.com/microsoft/azure-devops-go-api/azuredevops/accounts/models.go
rename to vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/accounts/models.go
index 6108c1cd8..44024e274 100644
--- a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/accounts/models.go
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/accounts/models.go
@@ -10,7 +10,7 @@ package accounts
import (
"github.com/google/uuid"
- "github.com/microsoft/azure-devops-go-api/azuredevops"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6"
)
type Account struct {
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/build/client.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/build/client.go
similarity index 84%
rename from vendor/github.com/microsoft/azure-devops-go-api/azuredevops/build/client.go
rename to vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/build/client.go
index 24fa136f3..eba28d7ea 100644
--- a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/build/client.go
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/build/client.go
@@ -13,8 +13,8 @@ import (
"context"
"encoding/json"
"github.com/google/uuid"
- "github.com/microsoft/azure-devops-go-api/azuredevops"
- "github.com/microsoft/azure-devops-go-api/azuredevops/webapi"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/webapi"
"io"
"net/http"
"net/url"
@@ -33,6 +33,8 @@ type Client interface {
AddDefinitionTag(context.Context, AddDefinitionTagArgs) (*[]string, error)
// [Preview API] Adds multiple tags to a definition.
AddDefinitionTags(context.Context, AddDefinitionTagsArgs) (*[]string, error)
+ // [Preview API] Adds new leases for pipeline runs.
+ AddRetentionLeases(context.Context, AddRetentionLeasesArgs) (*[]RetentionLease, error)
// [Preview API]
AuthorizeDefinitionResources(context.Context, AuthorizeDefinitionResourcesArgs) (*[]DefinitionResourceReference, error)
// [Preview API]
@@ -53,6 +55,10 @@ type Client interface {
DeleteDefinitionTag(context.Context, DeleteDefinitionTagArgs) (*[]string, error)
// [Preview API] Deletes a definition folder. Definitions and their corresponding builds will also be deleted.
DeleteFolder(context.Context, DeleteFolderArgs) error
+ // [Preview API] Removes specific retention leases.
+ DeleteRetentionLeasesById(context.Context, DeleteRetentionLeasesByIdArgs) error
+ // Removes a tag from builds, definitions, and from the tag store
+ DeleteTag(context.Context, DeleteTagArgs) (*[]string, error)
// Deletes a build definition template.
DeleteTemplate(context.Context, DeleteTemplateArgs) error
// Gets a specific artifact for a build.
@@ -77,6 +83,8 @@ type Client interface {
GetBuildController(context.Context, GetBuildControllerArgs) (*BuildController, error)
// Gets controller, optionally filtered by name
GetBuildControllers(context.Context, GetBuildControllersArgs) (*[]BuildController, error)
+ // [Preview API] Gets pipeline general settings.
+ GetBuildGeneralSettings(context.Context, GetBuildGeneralSettingsArgs) (*PipelineGeneralSettings, error)
// Gets an individual log file for a build.
GetBuildLog(context.Context, GetBuildLogArgs) (io.ReadCloser, error)
// Gets an individual log file for a build.
@@ -141,9 +149,19 @@ type Client interface {
GetPullRequest(context.Context, GetPullRequestArgs) (*PullRequest, error)
// [Preview API] Gets information about build resources in the system.
GetResourceUsage(context.Context, GetResourceUsageArgs) (*BuildResourceUsage, error)
+ // [Preview API] Returns the details of the retention lease given a lease id.
+ GetRetentionLease(context.Context, GetRetentionLeaseArgs) (*RetentionLease, error)
+ // [Preview API] Returns any leases matching the specified MinimalRetentionLeases
+ GetRetentionLeasesByMinimalRetentionLeases(context.Context, GetRetentionLeasesByMinimalRetentionLeasesArgs) (*[]RetentionLease, error)
+ // [Preview API] Returns any leases owned by the specified entity, optionally scoped to a single pipeline definition and run.
+ GetRetentionLeasesByOwnerId(context.Context, GetRetentionLeasesByOwnerIdArgs) (*[]RetentionLease, error)
+ // [Preview API] Returns any leases owned by the specified user, optionally scoped to a single pipeline definition and run.
+ GetRetentionLeasesByUserId(context.Context, GetRetentionLeasesByUserIdArgs) (*[]RetentionLease, error)
+ // [Preview API] Gets the project's retention settings.
+ GetRetentionSettings(context.Context, GetRetentionSettingsArgs) (*ProjectRetentionSetting, error)
// [Preview API]
Gets the build status for a definition, optionally scoped to a specific branch, stage, job, and configuration.
If there are more than one, then it is required to pass in a stageName value when specifying a jobName, and the same rule then applies for both if passing a configuration parameter.
GetStatusBadge(context.Context, GetStatusBadgeArgs) (*string, error)
- // Gets a list of all build and definition tags in the project.
+ // Gets a list of all build tags in the project.
GetTags(context.Context, GetTagsArgs) (*[]string, error)
// Gets a specific build definition template.
GetTemplate(context.Context, GetTemplateArgs) (*BuildDefinitionTemplate, error)
@@ -169,6 +187,8 @@ type Client interface {
SaveTemplate(context.Context, SaveTemplateArgs) (*BuildDefinitionTemplate, error)
// Updates a build.
UpdateBuild(context.Context, UpdateBuildArgs) (*Build, error)
+ // [Preview API] Updates pipeline general settings.
+ UpdateBuildGeneralSettings(context.Context, UpdateBuildGeneralSettingsArgs) (*PipelineGeneralSettings, error)
// [Preview API] Updates properties for a build.
UpdateBuildProperties(context.Context, UpdateBuildPropertiesArgs) (interface{}, error)
// Updates multiple builds.
@@ -181,6 +201,10 @@ type Client interface {
UpdateDefinitionProperties(context.Context, UpdateDefinitionPropertiesArgs) (interface{}, error)
// [Preview API] Updates an existing folder at given existing path
UpdateFolder(context.Context, UpdateFolderArgs) (*Folder, error)
+ // [Preview API] Updates the project's retention settings.
+ UpdateRetentionSettings(context.Context, UpdateRetentionSettingsArgs) (*ProjectRetentionSetting, error)
+ // [Preview API] Update a build stage
+ UpdateStage(context.Context, UpdateStageArgs) error
}
type ClientImpl struct {
@@ -214,7 +238,7 @@ func (client *ClientImpl) AddBuildTag(ctx context.Context, args AddBuildTagArgs)
routeValues["tag"] = *args.Tag
locationId, _ := uuid.Parse("6e6114b2-8161-44c8-8f6c-c5505782427f")
- resp, err := client.Client.Send(ctx, http.MethodPut, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPut, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -254,7 +278,7 @@ func (client *ClientImpl) AddBuildTags(ctx context.Context, args AddBuildTagsArg
return nil, marshalErr
}
locationId, _ := uuid.Parse("6e6114b2-8161-44c8-8f6c-c5505782427f")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -291,7 +315,7 @@ func (client *ClientImpl) AddDefinitionTag(ctx context.Context, args AddDefiniti
routeValues["tag"] = *args.Tag
locationId, _ := uuid.Parse("cb894432-134a-4d31-a839-83beceaace4b")
- resp, err := client.Client.Send(ctx, http.MethodPut, locationId, "5.1-preview.2", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPut, locationId, "6.0-preview.2", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -331,7 +355,7 @@ func (client *ClientImpl) AddDefinitionTags(ctx context.Context, args AddDefinit
return nil, marshalErr
}
locationId, _ := uuid.Parse("cb894432-134a-4d31-a839-83beceaace4b")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.2", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.2", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -351,6 +375,40 @@ type AddDefinitionTagsArgs struct {
DefinitionId *int
}
+// [Preview API] Adds new leases for pipeline runs.
+func (client *ClientImpl) AddRetentionLeases(ctx context.Context, args AddRetentionLeasesArgs) (*[]RetentionLease, error) {
+ if args.NewLeases == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.NewLeases"}
+ }
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+
+ body, marshalErr := json.Marshal(*args.NewLeases)
+ if marshalErr != nil {
+ return nil, marshalErr
+ }
+ locationId, _ := uuid.Parse("272051e4-9af1-45b5-ae22-8d960a5539d4")
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []RetentionLease
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the AddRetentionLeases function
+type AddRetentionLeasesArgs struct {
+ // (required)
+ NewLeases *[]NewRetentionLease
+ // (required) Project ID or project name
+ Project *string
+}
+
// [Preview API]
func (client *ClientImpl) AuthorizeDefinitionResources(ctx context.Context, args AuthorizeDefinitionResourcesArgs) (*[]DefinitionResourceReference, error) {
if args.Resources == nil {
@@ -371,7 +429,7 @@ func (client *ClientImpl) AuthorizeDefinitionResources(ctx context.Context, args
return nil, marshalErr
}
locationId, _ := uuid.Parse("ea623316-1967-45eb-89ab-e9e6110cf2d6")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -407,7 +465,7 @@ func (client *ClientImpl) AuthorizeProjectResources(ctx context.Context, args Au
return nil, marshalErr
}
locationId, _ := uuid.Parse("398c85bc-81aa-4822-947c-a194a05f0fef")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -445,7 +503,7 @@ func (client *ClientImpl) CreateArtifact(ctx context.Context, args CreateArtifac
return nil, marshalErr
}
locationId, _ := uuid.Parse("1db06c96-014e-44e1-ac91-90b2d4b3e984")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -488,7 +546,7 @@ func (client *ClientImpl) CreateDefinition(ctx context.Context, args CreateDefin
return nil, marshalErr
}
locationId, _ := uuid.Parse("dbeaf647-6167-421a-bda9-c9327b25e2e6")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -531,7 +589,7 @@ func (client *ClientImpl) CreateFolder(ctx context.Context, args CreateFolderArg
return nil, marshalErr
}
locationId, _ := uuid.Parse("a906531b-d2da-4f55-bda7-f3e676cc50d9")
- resp, err := client.Client.Send(ctx, http.MethodPut, locationId, "5.1-preview.2", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPut, locationId, "6.0-preview.2", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -564,7 +622,7 @@ func (client *ClientImpl) DeleteBuild(ctx context.Context, args DeleteBuildArgs)
routeValues["buildId"] = strconv.Itoa(*args.BuildId)
locationId, _ := uuid.Parse("0cd358e1-9217-4d94-8269-1c1ee6f93dcf")
- _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return err
}
@@ -597,7 +655,7 @@ func (client *ClientImpl) DeleteBuildTag(ctx context.Context, args DeleteBuildTa
routeValues["tag"] = *args.Tag
locationId, _ := uuid.Parse("6e6114b2-8161-44c8-8f6c-c5505782427f")
- resp, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -630,7 +688,7 @@ func (client *ClientImpl) DeleteDefinition(ctx context.Context, args DeleteDefin
routeValues["definitionId"] = strconv.Itoa(*args.DefinitionId)
locationId, _ := uuid.Parse("dbeaf647-6167-421a-bda9-c9327b25e2e6")
- _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return err
}
@@ -663,7 +721,7 @@ func (client *ClientImpl) DeleteDefinitionTag(ctx context.Context, args DeleteDe
routeValues["tag"] = *args.Tag
locationId, _ := uuid.Parse("cb894432-134a-4d31-a839-83beceaace4b")
- resp, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1-preview.2", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0-preview.2", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -697,7 +755,7 @@ func (client *ClientImpl) DeleteFolder(ctx context.Context, args DeleteFolderArg
}
queryParams.Add("path", *args.Path)
locationId, _ := uuid.Parse("a906531b-d2da-4f55-bda7-f3e676cc50d9")
- _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1-preview.2", routeValues, queryParams, nil, "", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0-preview.2", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return err
}
@@ -713,6 +771,72 @@ type DeleteFolderArgs struct {
Path *string
}
+// [Preview API] Removes specific retention leases.
+func (client *ClientImpl) DeleteRetentionLeasesById(ctx context.Context, args DeleteRetentionLeasesByIdArgs) error {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+
+ queryParams := url.Values{}
+ if args.Ids == nil {
+ return &azuredevops.ArgumentNilError{ArgumentName: "ids"}
+ }
+ var stringList []string
+ for _, item := range *args.Ids {
+ stringList = append(stringList, strconv.Itoa(item))
+ }
+ listAsString := strings.Join((stringList)[:], ",")
+ queryParams.Add("ids", listAsString)
+ locationId, _ := uuid.Parse("272051e4-9af1-45b5-ae22-8d960a5539d4")
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// Arguments for the DeleteRetentionLeasesById function
+type DeleteRetentionLeasesByIdArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (required)
+ Ids *[]int
+}
+
+// Removes a tag from builds, definitions, and from the tag store
+func (client *ClientImpl) DeleteTag(ctx context.Context, args DeleteTagArgs) (*[]string, error) {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.Tag == nil || *args.Tag == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Tag"}
+ }
+ routeValues["tag"] = *args.Tag
+
+ locationId, _ := uuid.Parse("d84ac5c6-edc7-43d5-adc9-1b34be5dea09")
+ resp, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []string
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the DeleteTag function
+type DeleteTagArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (required) The tag to remove.
+ Tag *string
+}
+
// Deletes a build definition template.
func (client *ClientImpl) DeleteTemplate(ctx context.Context, args DeleteTemplateArgs) error {
routeValues := make(map[string]string)
@@ -726,7 +850,7 @@ func (client *ClientImpl) DeleteTemplate(ctx context.Context, args DeleteTemplat
routeValues["templateId"] = *args.TemplateId
locationId, _ := uuid.Parse("e884571e-7f92-4d6a-9274-3f5649900835")
- _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return err
}
@@ -760,7 +884,7 @@ func (client *ClientImpl) GetArtifact(ctx context.Context, args GetArtifactArgs)
}
queryParams.Add("artifactName", *args.ArtifactName)
locationId, _ := uuid.Parse("1db06c96-014e-44e1-ac91-90b2d4b3e984")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -798,7 +922,7 @@ func (client *ClientImpl) GetArtifactContentZip(ctx context.Context, args GetArt
}
queryParams.Add("artifactName", *args.ArtifactName)
locationId, _ := uuid.Parse("1db06c96-014e-44e1-ac91-90b2d4b3e984")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/zip", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/zip", nil)
if err != nil {
return nil, err
}
@@ -829,7 +953,7 @@ func (client *ClientImpl) GetArtifacts(ctx context.Context, args GetArtifactsArg
routeValues["buildId"] = strconv.Itoa(*args.BuildId)
locationId, _ := uuid.Parse("1db06c96-014e-44e1-ac91-90b2d4b3e984")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -876,7 +1000,7 @@ func (client *ClientImpl) GetAttachment(ctx context.Context, args GetAttachmentA
routeValues["name"] = *args.Name
locationId, _ := uuid.Parse("af5122d3-3438-485e-a25a-2dbbfde84ee6")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.2", routeValues, nil, nil, "", "application/octet-stream", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.2", routeValues, nil, nil, "", "application/octet-stream", nil)
if err != nil {
return nil, err
}
@@ -917,7 +1041,7 @@ func (client *ClientImpl) GetAttachments(ctx context.Context, args GetAttachment
routeValues["type"] = *args.Type
locationId, _ := uuid.Parse("f2192269-89fa-4f94-baf6-8fb128c55159")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.2", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.2", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -954,7 +1078,7 @@ func (client *ClientImpl) GetBuild(ctx context.Context, args GetBuildArgs) (*Bui
queryParams.Add("propertyFilters", *args.PropertyFilters)
}
locationId, _ := uuid.Parse("0cd358e1-9217-4d94-8269-1c1ee6f93dcf")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -994,7 +1118,7 @@ func (client *ClientImpl) GetBuildBadge(ctx context.Context, args GetBuildBadgeA
queryParams.Add("branchName", *args.BranchName)
}
locationId, _ := uuid.Parse("21b3b9ce-fad5-4567-9ad0-80679794e003")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.2", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.2", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1036,7 +1160,7 @@ func (client *ClientImpl) GetBuildBadgeData(ctx context.Context, args GetBuildBa
queryParams.Add("branchName", *args.BranchName)
}
locationId, _ := uuid.Parse("21b3b9ce-fad5-4567-9ad0-80679794e003")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.2", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.2", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1081,7 +1205,7 @@ func (client *ClientImpl) GetBuildChanges(ctx context.Context, args GetBuildChan
queryParams.Add("includeSourceChange", strconv.FormatBool(*args.IncludeSourceChange))
}
locationId, _ := uuid.Parse("54572c7b-bbd3-45d4-80dc-28be08941620")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1108,8 +1232,7 @@ type GetBuildChangesArgs struct {
// Return type for the GetBuildChanges function
type GetBuildChangesResponseValue struct {
- Value []Change
- // The continuation token to be used to get the next page of results.
+ Value []Change
ContinuationToken string
}
@@ -1122,7 +1245,7 @@ func (client *ClientImpl) GetBuildController(ctx context.Context, args GetBuildC
routeValues["controllerId"] = strconv.Itoa(*args.ControllerId)
locationId, _ := uuid.Parse("fcac1932-2ee1-437f-9b6f-7f696be858f6")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1145,7 +1268,7 @@ func (client *ClientImpl) GetBuildControllers(ctx context.Context, args GetBuild
queryParams.Add("name", *args.Name)
}
locationId, _ := uuid.Parse("fcac1932-2ee1-437f-9b6f-7f696be858f6")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", nil, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", nil, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1161,6 +1284,31 @@ type GetBuildControllersArgs struct {
Name *string
}
+// [Preview API] Gets pipeline general settings.
+func (client *ClientImpl) GetBuildGeneralSettings(ctx context.Context, args GetBuildGeneralSettingsArgs) (*PipelineGeneralSettings, error) {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+
+ locationId, _ := uuid.Parse("c4aefd19-30ff-405b-80ad-aca021e7242a")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue PipelineGeneralSettings
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetBuildGeneralSettings function
+type GetBuildGeneralSettingsArgs struct {
+ // (required) Project ID or project name
+ Project *string
+}
+
// Gets an individual log file for a build.
func (client *ClientImpl) GetBuildLog(ctx context.Context, args GetBuildLogArgs) (io.ReadCloser, error) {
routeValues := make(map[string]string)
@@ -1185,7 +1333,7 @@ func (client *ClientImpl) GetBuildLog(ctx context.Context, args GetBuildLogArgs)
queryParams.Add("endLine", strconv.FormatUint(*args.EndLine, 10))
}
locationId, _ := uuid.Parse("35a80daf-7f30-45fc-86e8-6b813d9c90df")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "text/plain", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "text/plain", nil)
if err != nil {
return nil, err
}
@@ -1231,7 +1379,7 @@ func (client *ClientImpl) GetBuildLogLines(ctx context.Context, args GetBuildLog
queryParams.Add("endLine", strconv.FormatUint(*args.EndLine, 10))
}
locationId, _ := uuid.Parse("35a80daf-7f30-45fc-86e8-6b813d9c90df")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1268,7 +1416,7 @@ func (client *ClientImpl) GetBuildLogs(ctx context.Context, args GetBuildLogsArg
routeValues["buildId"] = strconv.Itoa(*args.BuildId)
locationId, _ := uuid.Parse("35a80daf-7f30-45fc-86e8-6b813d9c90df")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1299,7 +1447,7 @@ func (client *ClientImpl) GetBuildLogsZip(ctx context.Context, args GetBuildLogs
routeValues["buildId"] = strconv.Itoa(*args.BuildId)
locationId, _ := uuid.Parse("35a80daf-7f30-45fc-86e8-6b813d9c90df")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, nil, nil, "", "application/zip", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/zip", nil)
if err != nil {
return nil, err
}
@@ -1339,7 +1487,7 @@ func (client *ClientImpl) GetBuildLogZip(ctx context.Context, args GetBuildLogZi
queryParams.Add("endLine", strconv.FormatUint(*args.EndLine, 10))
}
locationId, _ := uuid.Parse("35a80daf-7f30-45fc-86e8-6b813d9c90df")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/zip", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/zip", nil)
if err != nil {
return nil, err
}
@@ -1369,7 +1517,7 @@ func (client *ClientImpl) GetBuildOptionDefinitions(ctx context.Context, args Ge
}
locationId, _ := uuid.Parse("591cb5a4-2d46-4f3a-a697-5cd42b6bd332")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1403,7 +1551,7 @@ func (client *ClientImpl) GetBuildProperties(ctx context.Context, args GetBuildP
queryParams.Add("filter", listAsString)
}
locationId, _ := uuid.Parse("0a6312e9-0627-49b7-8083-7d74a64849c9")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1440,7 +1588,7 @@ func (client *ClientImpl) GetBuildReport(ctx context.Context, args GetBuildRepor
queryParams.Add("type", *args.Type)
}
locationId, _ := uuid.Parse("45bcaa88-67e1-4042-a035-56d3b4a7d44c")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.2", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.2", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1477,7 +1625,7 @@ func (client *ClientImpl) GetBuildReportHtmlContent(ctx context.Context, args Ge
queryParams.Add("type", *args.Type)
}
locationId, _ := uuid.Parse("45bcaa88-67e1-4042-a035-56d3b4a7d44c")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.2", routeValues, queryParams, nil, "", "text/html", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.2", routeValues, queryParams, nil, "", "text/html", nil)
if err != nil {
return nil, err
}
@@ -1524,10 +1672,10 @@ func (client *ClientImpl) GetBuilds(ctx context.Context, args GetBuildsArgs) (*G
queryParams.Add("buildNumber", *args.BuildNumber)
}
if args.MinTime != nil {
- queryParams.Add("minTime", (*args.MinTime).String())
+ queryParams.Add("minTime", (*args.MinTime).AsQueryParameter())
}
if args.MaxTime != nil {
- queryParams.Add("maxTime", (*args.MaxTime).String())
+ queryParams.Add("maxTime", (*args.MaxTime).AsQueryParameter())
}
if args.RequestedFor != nil {
queryParams.Add("requestedFor", *args.RequestedFor)
@@ -1582,7 +1730,7 @@ func (client *ClientImpl) GetBuilds(ctx context.Context, args GetBuildsArgs) (*G
queryParams.Add("repositoryType", *args.RepositoryType)
}
locationId, _ := uuid.Parse("0cd358e1-9217-4d94-8269-1c1ee6f93dcf")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1641,8 +1789,7 @@ type GetBuildsArgs struct {
// Return type for the GetBuilds function
type GetBuildsResponseValue struct {
- Value []Build
- // The continuation token to be used to get the next page of results.
+ Value []Build
ContinuationToken string
}
@@ -1654,7 +1801,7 @@ func (client *ClientImpl) GetBuildSettings(ctx context.Context, args GetBuildSet
}
locationId, _ := uuid.Parse("aa8c1c9c-ef8b-474a-b8c4-785c7b191d0d")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1683,7 +1830,7 @@ func (client *ClientImpl) GetBuildTags(ctx context.Context, args GetBuildTagsArg
routeValues["buildId"] = strconv.Itoa(*args.BuildId)
locationId, _ := uuid.Parse("6e6114b2-8161-44c8-8f6c-c5505782427f")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1724,7 +1871,7 @@ func (client *ClientImpl) GetBuildTimeline(ctx context.Context, args GetBuildTim
queryParams.Add("planId", (*args.PlanId).String())
}
locationId, _ := uuid.Parse("8baac422-4c6e-4de5-8532-db96d92acffa")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1765,7 +1912,7 @@ func (client *ClientImpl) GetBuildWorkItemsRefs(ctx context.Context, args GetBui
queryParams.Add("$top", strconv.Itoa(*args.Top))
}
locationId, _ := uuid.Parse("5a21f5d2-5642-47e4-a0bd-1356e6731bee")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1809,7 +1956,7 @@ func (client *ClientImpl) GetBuildWorkItemsRefsFromCommits(ctx context.Context,
return nil, marshalErr
}
locationId, _ := uuid.Parse("5a21f5d2-5642-47e4-a0bd-1356e6731bee")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1850,7 +1997,7 @@ func (client *ClientImpl) GetChangesBetweenBuilds(ctx context.Context, args GetC
queryParams.Add("$top", strconv.Itoa(*args.Top))
}
locationId, _ := uuid.Parse("f10f0ea5-18a1-43ec-a8fb-2042c7be9b43")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.2", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.2", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1889,7 +2036,7 @@ func (client *ClientImpl) GetDefinition(ctx context.Context, args GetDefinitionA
queryParams.Add("revision", strconv.Itoa(*args.Revision))
}
if args.MinMetricsTime != nil {
- queryParams.Add("minMetricsTime", (*args.MinMetricsTime).String())
+ queryParams.Add("minMetricsTime", (*args.MinMetricsTime).AsQueryParameter())
}
if args.PropertyFilters != nil {
listAsString := strings.Join((*args.PropertyFilters)[:], ",")
@@ -1899,7 +2046,7 @@ func (client *ClientImpl) GetDefinition(ctx context.Context, args GetDefinitionA
queryParams.Add("includeLatestBuilds", strconv.FormatBool(*args.IncludeLatestBuilds))
}
locationId, _ := uuid.Parse("dbeaf647-6167-421a-bda9-c9327b25e2e6")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1939,10 +2086,10 @@ func (client *ClientImpl) GetDefinitionMetrics(ctx context.Context, args GetDefi
queryParams := url.Values{}
if args.MinMetricsTime != nil {
- queryParams.Add("minMetricsTime", (*args.MinMetricsTime).String())
+ queryParams.Add("minMetricsTime", (*args.MinMetricsTime).AsQueryParameter())
}
locationId, _ := uuid.Parse("d973b939-0ce0-4fec-91d8-da3940fa1827")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1980,7 +2127,7 @@ func (client *ClientImpl) GetDefinitionProperties(ctx context.Context, args GetD
queryParams.Add("filter", listAsString)
}
locationId, _ := uuid.Parse("d9826ad7-2a68-46a9-a6e9-677698777895")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2013,7 +2160,7 @@ func (client *ClientImpl) GetDefinitionResources(ctx context.Context, args GetDe
routeValues["definitionId"] = strconv.Itoa(*args.DefinitionId)
locationId, _ := uuid.Parse("ea623316-1967-45eb-89ab-e9e6110cf2d6")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2044,7 +2191,7 @@ func (client *ClientImpl) GetDefinitionRevisions(ctx context.Context, args GetDe
routeValues["definitionId"] = strconv.Itoa(*args.DefinitionId)
locationId, _ := uuid.Parse("7c116775-52e5-453e-8c5d-914d9762d8c4")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2090,7 +2237,7 @@ func (client *ClientImpl) GetDefinitions(ctx context.Context, args GetDefinition
queryParams.Add("continuationToken", *args.ContinuationToken)
}
if args.MinMetricsTime != nil {
- queryParams.Add("minMetricsTime", (*args.MinMetricsTime).String())
+ queryParams.Add("minMetricsTime", (*args.MinMetricsTime).AsQueryParameter())
}
if args.DefinitionIds != nil {
var stringList []string
@@ -2125,7 +2272,7 @@ func (client *ClientImpl) GetDefinitions(ctx context.Context, args GetDefinition
queryParams.Add("yamlFilename", *args.YamlFilename)
}
locationId, _ := uuid.Parse("dbeaf647-6167-421a-bda9-c9327b25e2e6")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2176,8 +2323,7 @@ type GetDefinitionsArgs struct {
// Return type for the GetDefinitions function
type GetDefinitionsResponseValue struct {
- Value []BuildDefinitionReference
- // The continuation token to be used to get the next page of results.
+ Value []BuildDefinitionReference
ContinuationToken string
}
@@ -2198,7 +2344,7 @@ func (client *ClientImpl) GetDefinitionTags(ctx context.Context, args GetDefinit
queryParams.Add("revision", strconv.Itoa(*args.Revision))
}
locationId, _ := uuid.Parse("cb894432-134a-4d31-a839-83beceaace4b")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.2", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.2", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2244,7 +2390,7 @@ func (client *ClientImpl) GetFile(ctx context.Context, args GetFileArgs) (io.Rea
}
queryParams.Add("fileName", *args.FileName)
locationId, _ := uuid.Parse("1db06c96-014e-44e1-ac91-90b2d4b3e984")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/octet-stream", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/octet-stream", nil)
if err != nil {
return nil, err
}
@@ -2292,7 +2438,7 @@ func (client *ClientImpl) GetFileContents(ctx context.Context, args GetFileConte
queryParams.Add("path", *args.Path)
}
locationId, _ := uuid.Parse("29d12225-b1d9-425f-b668-6c594a981313")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "text/plain", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "text/plain", nil)
if err != nil {
return nil, err
}
@@ -2332,7 +2478,7 @@ func (client *ClientImpl) GetFolders(ctx context.Context, args GetFoldersArgs) (
queryParams.Add("queryOrder", string(*args.QueryOrder))
}
locationId, _ := uuid.Parse("a906531b-d2da-4f55-bda7-f3e676cc50d9")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.2", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.2", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2369,7 +2515,7 @@ func (client *ClientImpl) GetLatestBuild(ctx context.Context, args GetLatestBuil
queryParams.Add("branchName", *args.BranchName)
}
locationId, _ := uuid.Parse("54481611-01f4-47f3-998f-160da0f0c229")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2415,7 +2561,7 @@ func (client *ClientImpl) GetPathContents(ctx context.Context, args GetPathConte
queryParams.Add("path", *args.Path)
}
locationId, _ := uuid.Parse("7944d6fb-df01-4709-920a-7a189aa34037")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2454,10 +2600,10 @@ func (client *ClientImpl) GetProjectMetrics(ctx context.Context, args GetProject
queryParams := url.Values{}
if args.MinMetricsTime != nil {
- queryParams.Add("minMetricsTime", (*args.MinMetricsTime).String())
+ queryParams.Add("minMetricsTime", (*args.MinMetricsTime).AsQueryParameter())
}
locationId, _ := uuid.Parse("7433fae7-a6bc-41dc-a6e2-eef9005ce41a")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2493,7 +2639,7 @@ func (client *ClientImpl) GetProjectResources(ctx context.Context, args GetProje
queryParams.Add("id", *args.Id)
}
locationId, _ := uuid.Parse("398c85bc-81aa-4822-947c-a194a05f0fef")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2537,7 +2683,7 @@ func (client *ClientImpl) GetPullRequest(ctx context.Context, args GetPullReques
queryParams.Add("serviceEndpointId", (*args.ServiceEndpointId).String())
}
locationId, _ := uuid.Parse("d8763ec7-9ff0-4fb4-b2b2-9d757906ff14")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2564,7 +2710,7 @@ type GetPullRequestArgs struct {
// [Preview API] Gets information about build resources in the system.
func (client *ClientImpl) GetResourceUsage(ctx context.Context, args GetResourceUsageArgs) (*BuildResourceUsage, error) {
locationId, _ := uuid.Parse("3813d06c-9e36-4ea1-aac3-61a485d60e3d")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.2", nil, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.2", nil, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2578,6 +2724,186 @@ func (client *ClientImpl) GetResourceUsage(ctx context.Context, args GetResource
type GetResourceUsageArgs struct {
}
+// [Preview API] Returns the details of the retention lease given a lease id.
+func (client *ClientImpl) GetRetentionLease(ctx context.Context, args GetRetentionLeaseArgs) (*RetentionLease, error) {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.LeaseId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.LeaseId"}
+ }
+ routeValues["leaseId"] = strconv.Itoa(*args.LeaseId)
+
+ locationId, _ := uuid.Parse("272051e4-9af1-45b5-ae22-8d960a5539d4")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue RetentionLease
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetRetentionLease function
+type GetRetentionLeaseArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (required)
+ LeaseId *int
+}
+
+// [Preview API] Returns any leases matching the specified MinimalRetentionLeases
+func (client *ClientImpl) GetRetentionLeasesByMinimalRetentionLeases(ctx context.Context, args GetRetentionLeasesByMinimalRetentionLeasesArgs) (*[]RetentionLease, error) {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+
+ queryParams := url.Values{}
+ if args.LeasesToFetch == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "leasesToFetch"}
+ }
+ var stringList []string
+ for _, item := range *args.LeasesToFetch {
+ lease, err := json.Marshal(item)
+ if err != nil {
+ return nil, err
+ }
+ stringList = append(stringList, string(lease))
+ }
+ listAsString := strings.Join((stringList)[:], "|")
+ queryParams.Add("leasesToFetch", listAsString)
+ locationId, _ := uuid.Parse("272051e4-9af1-45b5-ae22-8d960a5539d4")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []RetentionLease
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetRetentionLeasesByMinimalRetentionLeases function
+type GetRetentionLeasesByMinimalRetentionLeasesArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (required) List of JSON-serialized MinimalRetentionLeases separated by '|'
+ LeasesToFetch *[]MinimalRetentionLease
+}
+
+// [Preview API] Returns any leases owned by the specified entity, optionally scoped to a single pipeline definition and run.
+func (client *ClientImpl) GetRetentionLeasesByOwnerId(ctx context.Context, args GetRetentionLeasesByOwnerIdArgs) (*[]RetentionLease, error) {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+
+ queryParams := url.Values{}
+ if args.OwnerId != nil {
+ queryParams.Add("ownerId", *args.OwnerId)
+ }
+ if args.DefinitionId != nil {
+ queryParams.Add("definitionId", strconv.Itoa(*args.DefinitionId))
+ }
+ if args.RunId != nil {
+ queryParams.Add("runId", strconv.Itoa(*args.RunId))
+ }
+ locationId, _ := uuid.Parse("272051e4-9af1-45b5-ae22-8d960a5539d4")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []RetentionLease
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetRetentionLeasesByOwnerId function
+type GetRetentionLeasesByOwnerIdArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (optional)
+ OwnerId *string
+ // (optional) An optional parameter to limit the search to a specific pipeline definition.
+ DefinitionId *int
+ // (optional) An optional parameter to limit the search to a single pipeline run. Requires definitionId.
+ RunId *int
+}
+
+// [Preview API] Returns any leases owned by the specified user, optionally scoped to a single pipeline definition and run.
+func (client *ClientImpl) GetRetentionLeasesByUserId(ctx context.Context, args GetRetentionLeasesByUserIdArgs) (*[]RetentionLease, error) {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+
+ queryParams := url.Values{}
+ if args.UserOwnerId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "userOwnerId"}
+ }
+ queryParams.Add("userOwnerId", (*args.UserOwnerId).String())
+ if args.DefinitionId != nil {
+ queryParams.Add("definitionId", strconv.Itoa(*args.DefinitionId))
+ }
+ if args.RunId != nil {
+ queryParams.Add("runId", strconv.Itoa(*args.RunId))
+ }
+ locationId, _ := uuid.Parse("272051e4-9af1-45b5-ae22-8d960a5539d4")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []RetentionLease
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetRetentionLeasesByUserId function
+type GetRetentionLeasesByUserIdArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (required) The user id to search for.
+ UserOwnerId *uuid.UUID
+ // (optional) An optional parameter to limit the search to a specific pipeline definition.
+ DefinitionId *int
+ // (optional) An optional parameter to limit the search to a single pipeline run. Requires definitionId.
+ RunId *int
+}
+
+// [Preview API] Gets the project's retention settings.
+func (client *ClientImpl) GetRetentionSettings(ctx context.Context, args GetRetentionSettingsArgs) (*ProjectRetentionSetting, error) {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+
+ locationId, _ := uuid.Parse("dadb46e7-5851-4c72-820e-ae8abb82f59f")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue ProjectRetentionSetting
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetRetentionSettings function
+type GetRetentionSettingsArgs struct {
+ // (required) Project ID or project name
+ Project *string
+}
+
// [Preview API] Gets the build status for a definition, optionally scoped to a specific branch, stage, job, and configuration.
If there are more than one, then it is required to pass in a stageName value when specifying a jobName, and the same rule then applies for both if passing a configuration parameter.
func (client *ClientImpl) GetStatusBadge(ctx context.Context, args GetStatusBadgeArgs) (*string, error) {
routeValues := make(map[string]string)
@@ -2607,7 +2933,7 @@ func (client *ClientImpl) GetStatusBadge(ctx context.Context, args GetStatusBadg
queryParams.Add("label", *args.Label)
}
locationId, _ := uuid.Parse("07acfdce-4757-4439-b422-ddd13a2fcc10")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2635,7 +2961,7 @@ type GetStatusBadgeArgs struct {
Label *string
}
-// Gets a list of all build and definition tags in the project.
+// Gets a list of all build tags in the project.
func (client *ClientImpl) GetTags(ctx context.Context, args GetTagsArgs) (*[]string, error) {
routeValues := make(map[string]string)
if args.Project == nil || *args.Project == "" {
@@ -2644,7 +2970,7 @@ func (client *ClientImpl) GetTags(ctx context.Context, args GetTagsArgs) (*[]str
routeValues["project"] = *args.Project
locationId, _ := uuid.Parse("d84ac5c6-edc7-43d5-adc9-1b34be5dea09")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2673,7 +2999,7 @@ func (client *ClientImpl) GetTemplate(ctx context.Context, args GetTemplateArgs)
routeValues["templateId"] = *args.TemplateId
locationId, _ := uuid.Parse("e884571e-7f92-4d6a-9274-3f5649900835")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2700,7 +3026,7 @@ func (client *ClientImpl) GetTemplates(ctx context.Context, args GetTemplatesArg
routeValues["project"] = *args.Project
locationId, _ := uuid.Parse("e884571e-7f92-4d6a-9274-3f5649900835")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2737,7 +3063,7 @@ func (client *ClientImpl) GetWorkItemsBetweenBuilds(ctx context.Context, args Ge
queryParams.Add("$top", strconv.Itoa(*args.Top))
}
locationId, _ := uuid.Parse("52ba8915-5518-42e3-a4bb-b0182d159e2d")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.2", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.2", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2782,7 +3108,7 @@ func (client *ClientImpl) ListBranches(ctx context.Context, args ListBranchesArg
queryParams.Add("branchName", *args.BranchName)
}
locationId, _ := uuid.Parse("e05d4403-9b81-4244-8763-20fde28d1976")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2835,7 +3161,7 @@ func (client *ClientImpl) ListRepositories(ctx context.Context, args ListReposit
queryParams.Add("continuationToken", *args.ContinuationToken)
}
locationId, _ := uuid.Parse("d44d1680-f978-4834-9b93-8c6e132329c9")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2872,7 +3198,7 @@ func (client *ClientImpl) ListSourceProviders(ctx context.Context, args ListSour
routeValues["project"] = *args.Project
locationId, _ := uuid.Parse("3ce81729-954f-423d-a581-9fea01d25186")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2908,7 +3234,7 @@ func (client *ClientImpl) ListWebhooks(ctx context.Context, args ListWebhooksArg
queryParams.Add("repository", *args.Repository)
}
locationId, _ := uuid.Parse("8f20ff82-9498-4812-9f6e-9c01bdc50e99")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2951,12 +3277,15 @@ func (client *ClientImpl) QueueBuild(ctx context.Context, args QueueBuildArgs) (
if args.SourceBuildId != nil {
queryParams.Add("sourceBuildId", strconv.Itoa(*args.SourceBuildId))
}
+ if args.DefinitionId != nil {
+ queryParams.Add("definitionId", strconv.Itoa(*args.DefinitionId))
+ }
body, marshalErr := json.Marshal(*args.Build)
if marshalErr != nil {
return nil, marshalErr
}
locationId, _ := uuid.Parse("0cd358e1-9217-4d94-8269-1c1ee6f93dcf")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2978,6 +3307,8 @@ type QueueBuildArgs struct {
CheckInTicket *string
// (optional)
SourceBuildId *int
+ // (optional) Optional definition id to queue a build without a body. Ignored if there's a valid body
+ DefinitionId *int
}
// Restores a deleted definition
@@ -2998,7 +3329,7 @@ func (client *ClientImpl) RestoreDefinition(ctx context.Context, args RestoreDef
}
queryParams.Add("deleted", strconv.FormatBool(*args.Deleted))
locationId, _ := uuid.Parse("dbeaf647-6167-421a-bda9-c9327b25e2e6")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -3045,7 +3376,7 @@ func (client *ClientImpl) RestoreWebhooks(ctx context.Context, args RestoreWebho
return marshalErr
}
locationId, _ := uuid.Parse("793bceb8-9736-4030-bd2f-fb3ce6d6b478")
- _, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.1", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.1", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return err
}
@@ -3087,7 +3418,7 @@ func (client *ClientImpl) SaveTemplate(ctx context.Context, args SaveTemplateArg
return nil, marshalErr
}
locationId, _ := uuid.Parse("e884571e-7f92-4d6a-9274-3f5649900835")
- resp, err := client.Client.Send(ctx, http.MethodPut, locationId, "5.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPut, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -3131,7 +3462,7 @@ func (client *ClientImpl) UpdateBuild(ctx context.Context, args UpdateBuildArgs)
return nil, marshalErr
}
locationId, _ := uuid.Parse("0cd358e1-9217-4d94-8269-1c1ee6f93dcf")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -3153,6 +3484,40 @@ type UpdateBuildArgs struct {
Retry *bool
}
+// [Preview API] Updates pipeline general settings.
+func (client *ClientImpl) UpdateBuildGeneralSettings(ctx context.Context, args UpdateBuildGeneralSettingsArgs) (*PipelineGeneralSettings, error) {
+ if args.NewSettings == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.NewSettings"}
+ }
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+
+ body, marshalErr := json.Marshal(*args.NewSettings)
+ if marshalErr != nil {
+ return nil, marshalErr
+ }
+ locationId, _ := uuid.Parse("c4aefd19-30ff-405b-80ad-aca021e7242a")
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue PipelineGeneralSettings
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the UpdateBuildGeneralSettings function
+type UpdateBuildGeneralSettingsArgs struct {
+ // (required)
+ NewSettings *PipelineGeneralSettings
+ // (required) Project ID or project name
+ Project *string
+}
+
// [Preview API] Updates properties for a build.
func (client *ClientImpl) UpdateBuildProperties(ctx context.Context, args UpdateBuildPropertiesArgs) (interface{}, error) {
if args.Document == nil {
@@ -3173,7 +3538,7 @@ func (client *ClientImpl) UpdateBuildProperties(ctx context.Context, args Update
return nil, marshalErr
}
locationId, _ := uuid.Parse("0a6312e9-0627-49b7-8083-7d74a64849c9")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1-preview.1", routeValues, nil, bytes.NewReader(body), "application/json-patch+json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json-patch+json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -3209,7 +3574,7 @@ func (client *ClientImpl) UpdateBuilds(ctx context.Context, args UpdateBuildsArg
return nil, marshalErr
}
locationId, _ := uuid.Parse("0cd358e1-9217-4d94-8269-1c1ee6f93dcf")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -3242,7 +3607,7 @@ func (client *ClientImpl) UpdateBuildSettings(ctx context.Context, args UpdateBu
return nil, marshalErr
}
locationId, _ := uuid.Parse("aa8c1c9c-ef8b-474a-b8c4-785c7b191d0d")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -3287,7 +3652,7 @@ func (client *ClientImpl) UpdateDefinition(ctx context.Context, args UpdateDefin
return nil, marshalErr
}
locationId, _ := uuid.Parse("dbeaf647-6167-421a-bda9-c9327b25e2e6")
- resp, err := client.Client.Send(ctx, http.MethodPut, locationId, "5.1", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPut, locationId, "6.0", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -3331,7 +3696,7 @@ func (client *ClientImpl) UpdateDefinitionProperties(ctx context.Context, args U
return nil, marshalErr
}
locationId, _ := uuid.Parse("d9826ad7-2a68-46a9-a6e9-677698777895")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1-preview.1", routeValues, nil, bytes.NewReader(body), "application/json-patch+json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json-patch+json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -3372,7 +3737,7 @@ func (client *ClientImpl) UpdateFolder(ctx context.Context, args UpdateFolderArg
return nil, marshalErr
}
locationId, _ := uuid.Parse("a906531b-d2da-4f55-bda7-f3e676cc50d9")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.2", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.2", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -3391,3 +3756,80 @@ type UpdateFolderArgs struct {
// (required) The full path to the folder.
Path *string
}
+
+// [Preview API] Updates the project's retention settings.
+func (client *ClientImpl) UpdateRetentionSettings(ctx context.Context, args UpdateRetentionSettingsArgs) (*ProjectRetentionSetting, error) {
+ if args.UpdateModel == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.UpdateModel"}
+ }
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+
+ body, marshalErr := json.Marshal(*args.UpdateModel)
+ if marshalErr != nil {
+ return nil, marshalErr
+ }
+ locationId, _ := uuid.Parse("dadb46e7-5851-4c72-820e-ae8abb82f59f")
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue ProjectRetentionSetting
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the UpdateRetentionSettings function
+type UpdateRetentionSettingsArgs struct {
+ // (required)
+ UpdateModel *UpdateProjectRetentionSettingModel
+ // (required) Project ID or project name
+ Project *string
+}
+
+// [Preview API] Update a build stage
+func (client *ClientImpl) UpdateStage(ctx context.Context, args UpdateStageArgs) error {
+ if args.UpdateParameters == nil {
+ return &azuredevops.ArgumentNilError{ArgumentName: "args.UpdateParameters"}
+ }
+ routeValues := make(map[string]string)
+ if args.Project != nil && *args.Project != "" {
+ routeValues["project"] = *args.Project
+ }
+ if args.BuildId == nil {
+ return &azuredevops.ArgumentNilError{ArgumentName: "args.BuildId"}
+ }
+ routeValues["buildId"] = strconv.Itoa(*args.BuildId)
+ if args.StageRefName == nil || *args.StageRefName == "" {
+ return &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.StageRefName"}
+ }
+ routeValues["stageRefName"] = *args.StageRefName
+
+ body, marshalErr := json.Marshal(*args.UpdateParameters)
+ if marshalErr != nil {
+ return marshalErr
+ }
+ locationId, _ := uuid.Parse("b8aac6c9-744b-46e1-88fc-3550969f9313")
+ _, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// Arguments for the UpdateStage function
+type UpdateStageArgs struct {
+ // (required)
+ UpdateParameters *UpdateStageParameters
+ // (required)
+ BuildId *int
+ // (required)
+ StageRefName *string
+ // (optional) Project ID or project name
+ Project *string
+}
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/build/models.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/build/models.go
similarity index 94%
rename from vendor/github.com/microsoft/azure-devops-go-api/azuredevops/build/models.go
rename to vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/build/models.go
index 05f6d9553..058de3309 100644
--- a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/build/models.go
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/build/models.go
@@ -10,12 +10,12 @@ package build
import (
"github.com/google/uuid"
- "github.com/microsoft/azure-devops-go-api/azuredevops"
- "github.com/microsoft/azure-devops-go-api/azuredevops/core"
- "github.com/microsoft/azure-devops-go-api/azuredevops/distributedtaskcommon"
- "github.com/microsoft/azure-devops-go-api/azuredevops/git"
- "github.com/microsoft/azure-devops-go-api/azuredevops/test"
- "github.com/microsoft/azure-devops-go-api/azuredevops/webapi"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/core"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/distributedtaskcommon"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/git"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/test"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/webapi"
)
// Represents a queue for running builds.
@@ -241,7 +241,7 @@ type BuildArtifact struct {
Name *string `json:"name,omitempty"`
// The actual resource.
Resource *ArtifactResource `json:"resource,omitempty"`
- // The artifact source, which will be the ID of the job that produced this artifact.
+ // The artifact source, which will be the ID of the job that produced this artifact. If an artifact is associated with multiple sources, this points to the first source.
Source *string `json:"source,omitempty"`
}
@@ -848,6 +848,7 @@ type buildReasonValuesType struct {
CheckInShelveset BuildReason
PullRequest BuildReason
BuildCompletion BuildReason
+ ResourceTrigger BuildReason
Triggered BuildReason
All BuildReason
}
@@ -875,6 +876,8 @@ var BuildReasonValues = buildReasonValuesType{
PullRequest: "pullRequest",
// The build was started when another build completed.
BuildCompletion: "buildCompletion",
+ // The build was started when resources in pipeline triggered it
+ ResourceTrigger: "resourceTrigger",
// The build was triggered for retention policy purposes.
Triggered: "triggered",
// All reasons.
@@ -1518,6 +1521,15 @@ type MappingDetails struct {
ServerPath *string `json:"serverPath,omitempty"`
}
+type MinimalRetentionLease struct {
+ // The pipeline definition of the run.
+ DefinitionId *int `json:"definitionId,omitempty"`
+ // User-provided string that identifies the owner of a retention lease.
+ OwnerId *string `json:"ownerId,omitempty"`
+ // The pipeline run to protect.
+ RunId *int `json:"runId,omitempty"`
+}
+
// Represents options for running a phase against multiple agents.
type MultipleAgentExecutionOptions struct {
// Indicates the type of execution options.
@@ -1528,6 +1540,19 @@ type MultipleAgentExecutionOptions struct {
MaxConcurrency *int `json:"maxConcurrency,omitempty"`
}
+type NewRetentionLease struct {
+ // The number of days to consider the lease valid.
+ DaysValid *int `json:"daysValid,omitempty"`
+ // The pipeline definition of the run.
+ DefinitionId *int `json:"definitionId,omitempty"`
+ // User-provided string that identifies the owner of a retention lease.
+ OwnerId *string `json:"ownerId,omitempty"`
+ // If set, this lease will also prevent the pipeline from being deleted while the lease is still valid.
+ ProtectPipeline *bool `json:"protectPipeline,omitempty"`
+ // The pipeline run to protect.
+ RunId *int `json:"runId,omitempty"`
+}
+
// Represents a phase of a build definition.
type Phase struct {
// The condition that must be true for this phase to execute.
@@ -1555,6 +1580,20 @@ type PhaseTarget struct {
Type *int `json:"type,omitempty"`
}
+// Contains pipeline general settings.
+type PipelineGeneralSettings struct {
+ // If enabled, scope of access for all pipelines reduces to the current project.
+ EnforceJobAuthScope *bool `json:"enforceJobAuthScope,omitempty"`
+ // Restricts the scope of access for all pipelines to only repositories explicitly referenced by the pipeline.
+ EnforceReferencedRepoScopedToken *bool `json:"enforceReferencedRepoScopedToken,omitempty"`
+ // If enabled, only those variables that are explicitly marked as "Settable at queue time" can be set at queue time.
+ EnforceSettableVar *bool `json:"enforceSettableVar,omitempty"`
+ // Allows pipelines to record metadata.
+ PublishPipelineMetadata *bool `json:"publishPipelineMetadata,omitempty"`
+ // Anonymous users can access the status badge API for all pipelines unless this option is enabled.
+ StatusBadgesArePrivate *bool `json:"statusBadgesArePrivate,omitempty"`
+}
+
type ProcessTemplateType string
type processTemplateTypeValuesType struct {
@@ -1572,6 +1611,18 @@ var ProcessTemplateTypeValues = processTemplateTypeValuesType{
Upgrade: "upgrade",
}
+// Contains the settings for the retention rules.
+type ProjectRetentionSetting struct {
+ // The rules for artifact retention. Artifacts can not live longer than a run, so will be overridden by a shorter run purge setting.
+ PurgeArtifacts *RetentionSetting `json:"purgeArtifacts,omitempty"`
+ // The rules for pull request pipeline run retention.
+ PurgePullRequestRuns *RetentionSetting `json:"purgePullRequestRuns,omitempty"`
+ // The rules for pipeline run retention.
+ PurgeRuns *RetentionSetting `json:"purgeRuns,omitempty"`
+ // The rules for retaining runs per protected branch.
+ RetainRunsPerProtectedBranch *RetentionSetting `json:"retainRunsPerProtectedBranch,omitempty"`
+}
+
// Represents a pull request object. These are retrieved from Source Providers.
type PullRequest struct {
// The links to other objects related to this object.
@@ -1718,6 +1769,22 @@ var ResultSetValues = resultSetValuesType{
Top: "top",
}
+// A valid retention lease prevents automated systems from deleting a pipeline run.
+type RetentionLease struct {
+ // When the lease was created.
+ CreatedOn *azuredevops.Time `json:"createdOn,omitempty"`
+ // The pipeline definition of the run.
+ DefinitionId *int `json:"definitionId,omitempty"`
+ // The unique identifier for this lease.
+ LeaseId *int `json:"leaseId,omitempty"`
+ // Non-unique string that identifies the owner of a retention lease.
+ OwnerId *string `json:"ownerId,omitempty"`
+ // The pipeline run protected by this lease.
+ RunId *int `json:"runId,omitempty"`
+ // The last day the lease is considered valid.
+ ValidUntil *azuredevops.Time `json:"validUntil,omitempty"`
+}
+
// Represents a retention policy for a build definition.
type RetentionPolicy struct {
Artifacts *[]string `json:"artifacts,omitempty"`
@@ -1733,6 +1800,13 @@ type RetentionPolicy struct {
MinimumToKeep *int `json:"minimumToKeep,omitempty"`
}
+// Contains the minimum, maximum, and current value for a retention setting.
+type RetentionSetting struct {
+ Max *int `json:"max,omitempty"`
+ Min *int `json:"min,omitempty"`
+ Value *int `json:"value,omitempty"`
+}
+
type Schedule struct {
BranchFilters *[]string `json:"branchFilters,omitempty"`
// Days for a build (flags enum for days of the week)
@@ -1921,6 +1995,18 @@ type SourceRepositoryItem struct {
Url *string `json:"url,omitempty"`
}
+type StageUpdateType string
+
+type stageUpdateTypeValuesType struct {
+ Cancel StageUpdateType
+ Retry StageUpdateType
+}
+
+var StageUpdateTypeValues = stageUpdateTypeValuesType{
+ Cancel: "cancel",
+ Retry: "retry",
+}
+
type SupportedTrigger struct {
// The default interval to wait between polls (only relevant when NotificationType is Polling).
DefaultPollingInterval *int `json:"defaultPollingInterval,omitempty"`
@@ -2095,6 +2181,8 @@ type TimelineRecord struct {
// The current completion percentage.
PercentComplete *int `json:"percentComplete,omitempty"`
PreviousAttempts *[]TimelineAttempt `json:"previousAttempts,omitempty"`
+ // The queue ID of the queue that the operation ran on.
+ QueueId *int `json:"queueId,omitempty"`
// The result.
Result *TaskResult `json:"result,omitempty"`
// The result code.
@@ -2144,6 +2232,22 @@ type TimelineReference struct {
Url *string `json:"url,omitempty"`
}
+// Contains members for updating the retention settings values. All fields are optional.
+type UpdateProjectRetentionSettingModel struct {
+ ArtifactsRetention *UpdateRetentionSettingModel `json:"artifactsRetention,omitempty"`
+ PullRequestRunRetention *UpdateRetentionSettingModel `json:"pullRequestRunRetention,omitempty"`
+ RetainRunsPerProtectedBranch *UpdateRetentionSettingModel `json:"retainRunsPerProtectedBranch,omitempty"`
+ RunRetention *UpdateRetentionSettingModel `json:"runRetention,omitempty"`
+}
+
+type UpdateRetentionSettingModel struct {
+ Value *int `json:"value,omitempty"`
+}
+
+type UpdateStageParameters struct {
+ State *StageUpdateType `json:"state,omitempty"`
+}
+
type ValidationResult string
type validationResultValuesType struct {
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/client.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/client.go
new file mode 100644
index 000000000..da5c8b566
--- /dev/null
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/client.go
@@ -0,0 +1,450 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package azuredevops
+
+import (
+ "bytes"
+ "context"
+ "encoding/json"
+ "errors"
+ "io"
+ "io/ioutil"
+ "net/http"
+ "net/url"
+ "reflect"
+ "regexp"
+ "runtime"
+ "strings"
+ "sync"
+
+ "github.com/google/uuid"
+)
+
+const (
+ // header keys
+ headerKeyAccept = "Accept"
+ headerKeyAuthorization = "Authorization"
+ headerKeyContentType = "Content-Type"
+ HeaderKeyContinuationToken = "X-MS-ContinuationToken"
+ headerKeyFedAuthRedirect = "X-TFS-FedAuthRedirect"
+ headerKeyForceMsaPassThrough = "X-VSS-ForceMsaPassThrough"
+ headerKeySession = "X-TFS-Session"
+ headerUserAgent = "User-Agent"
+
+ // media types
+ MediaTypeTextPlain = "text/plain"
+ MediaTypeApplicationJson = "application/json"
+)
+
+// Unique session id to be used by all requests of this session.
+var SessionId = uuid.New().String()
+
+// ApiResourceLocation Cache by Url
+var apiResourceLocationCache = make(map[string]*map[uuid.UUID]ApiResourceLocation)
+var apiResourceLocationCacheLock = sync.RWMutex{}
+
+var version = "6.0.0-b1" // todo: remove hardcoded version
+var versionSuffix = " (dev)"
+
+// Base user agent string. The UserAgent set on the connection will be appended to this.
+var baseUserAgent = "go/" + runtime.Version() + " (" + runtime.GOOS + " " + runtime.GOARCH + ") azure-devops-go-api/" + version + versionSuffix
+
+// NewClient provides an Azure DevOps client
+// and copies the TLS config and timeout from the supplied connection
+func NewClient(connection *Connection, baseUrl string) *Client {
+ httpClient := &http.Client{}
+ if connection.TlsConfig != nil {
+ httpClient.Transport = &http.Transport{TLSClientConfig: connection.TlsConfig}
+ }
+ if connection.Timeout != nil {
+ httpClient.Timeout = *connection.Timeout
+ }
+
+ return NewClientWithOptions(connection, baseUrl, WithHTTPClient(httpClient))
+}
+
+// NewClientWithOptions returns an Azure DevOps client modified by the options
+func NewClientWithOptions(connection *Connection, baseUrl string, options ...ClientOptionFunc) *Client {
+ httpClient := &http.Client{}
+ client := &Client{
+ baseUrl: baseUrl,
+ client: httpClient,
+ authorization: connection.AuthorizationString,
+ suppressFedAuthRedirect: connection.SuppressFedAuthRedirect,
+ forceMsaPassThrough: connection.ForceMsaPassThrough,
+ userAgent: connection.UserAgent,
+ }
+ for _, fn := range options {
+ fn(client)
+ }
+ return client
+}
+
+type Client struct {
+ baseUrl string
+ client *http.Client
+ authorization string
+ suppressFedAuthRedirect bool
+ forceMsaPassThrough bool
+ userAgent string
+}
+
+func (client *Client) SendRequest(request *http.Request) (response *http.Response, err error) {
+ resp, err := client.client.Do(request) // todo: add retry logic
+ if resp != nil && (resp.StatusCode < 200 || resp.StatusCode >= 300) {
+ err = client.UnwrapError(resp)
+ }
+ return resp, err
+}
+
+func (client *Client) Send(ctx context.Context,
+ httpMethod string,
+ locationId uuid.UUID,
+ apiVersion string,
+ routeValues map[string]string,
+ queryParameters url.Values,
+ body io.Reader,
+ mediaType string,
+ acceptMediaType string,
+ additionalHeaders map[string]string) (response *http.Response, err error) {
+ location, err := client.getResourceLocation(ctx, locationId)
+ if err != nil {
+ return nil, err
+ }
+ generatedUrl := client.GenerateUrl(location, routeValues, queryParameters)
+ fullUrl := combineUrl(client.baseUrl, generatedUrl)
+ negotiatedVersion, err := negotiateRequestVersion(location, apiVersion)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := client.CreateRequestMessage(ctx, httpMethod, fullUrl, negotiatedVersion, body, mediaType, acceptMediaType, additionalHeaders)
+ if err != nil {
+ return nil, err
+ }
+
+ resp, err := client.SendRequest(req)
+ if err != nil {
+ return nil, err
+ }
+
+ // Set session if one was supplied in the response.
+ session, ok := resp.Header[headerKeySession]
+ if ok && len(session) > 0 {
+ SessionId = session[0]
+ }
+
+ return resp, err
+}
+
+func (client *Client) GenerateUrl(apiResourceLocation *ApiResourceLocation, routeValues map[string]string, queryParameters url.Values) (request string) {
+ builtUrl := *apiResourceLocation.RouteTemplate
+ if routeValues == nil {
+ routeValues = make(map[string]string)
+ }
+ routeValues["area"] = *apiResourceLocation.Area
+ routeValues["resource"] = *apiResourceLocation.ResourceName
+ builtUrl = transformRouteTemplate(builtUrl, routeValues)
+ if queryParameters != nil && len(queryParameters) > 0 {
+ builtUrl += "?" + queryParameters.Encode()
+ }
+ return builtUrl
+}
+
+func (client *Client) CreateRequestMessage(ctx context.Context,
+ httpMethod string,
+ url string,
+ apiVersion string,
+ body io.Reader,
+ mediaType string,
+ acceptMediaType string,
+ additionalHeaders map[string]string) (request *http.Request, err error) {
+ req, err := http.NewRequest(httpMethod, url, body)
+ if err != nil {
+ return nil, err
+ }
+
+ if ctx != nil {
+ req = req.WithContext(ctx)
+ }
+
+ if client.authorization != "" {
+ req.Header.Add(headerKeyAuthorization, client.authorization)
+ }
+ accept := acceptMediaType
+ if apiVersion != "" {
+ accept += ";api-version=" + apiVersion
+ }
+ req.Header.Add(headerKeyAccept, accept)
+ if mediaType != "" {
+ req.Header.Add(headerKeyContentType, mediaType+";charset=utf-8")
+ }
+ if client.suppressFedAuthRedirect {
+ req.Header.Add(headerKeyFedAuthRedirect, "Suppress")
+ }
+ if client.forceMsaPassThrough {
+ req.Header.Add(headerKeyForceMsaPassThrough, "true")
+ }
+
+ // set session if it has not already been set
+ _, ok := req.Header[headerKeySession]
+ if !ok {
+ req.Header.Add(headerKeySession, SessionId)
+ }
+
+ userAgent := baseUserAgent
+ if client.userAgent != "" {
+ userAgent += " " + client.userAgent
+ }
+ req.Header.Add(headerUserAgent, userAgent)
+
+ for key, value := range additionalHeaders {
+ req.Header.Add(key, value)
+ }
+
+ return req, err
+}
+
+func (client *Client) getResourceLocation(ctx context.Context, locationId uuid.UUID) (*ApiResourceLocation, error) {
+ locationsMap, ok := getApiResourceLocationCache(client.baseUrl)
+ if !ok {
+ locations, err := client.getResourceLocationsFromServer(ctx)
+ if err != nil {
+ return nil, err
+ }
+ newMap := make(map[uuid.UUID]ApiResourceLocation)
+ locationsMap = &newMap
+ for _, locationEntry := range locations {
+ (*locationsMap)[*locationEntry.Id] = locationEntry
+ }
+
+ setApiResourceLocationCache(client.baseUrl, locationsMap)
+ }
+
+ location, ok := (*locationsMap)[locationId]
+ if ok {
+ return &location, nil
+ }
+
+ return nil, &LocationIdNotRegisteredError{locationId, client.baseUrl}
+}
+
+func getApiResourceLocationCache(url string) (*map[uuid.UUID]ApiResourceLocation, bool) {
+ apiResourceLocationCacheLock.RLock()
+ defer apiResourceLocationCacheLock.RUnlock()
+ locationsMap, ok := apiResourceLocationCache[url]
+ return locationsMap, ok
+}
+
+func setApiResourceLocationCache(url string, locationsMap *map[uuid.UUID]ApiResourceLocation) {
+ apiResourceLocationCacheLock.Lock()
+ defer apiResourceLocationCacheLock.Unlock()
+ apiResourceLocationCache[url] = locationsMap
+}
+
+func (client *Client) getResourceLocationsFromServer(ctx context.Context) ([]ApiResourceLocation, error) {
+ optionsUri := combineUrl(client.baseUrl, "_apis")
+ request, err := client.CreateRequestMessage(ctx, http.MethodOptions, optionsUri, "", nil, "", MediaTypeApplicationJson, nil)
+ if err != nil {
+ return nil, err
+ }
+
+ resp, err := client.SendRequest(request)
+ if err != nil {
+ return nil, err
+ }
+
+ // Set session if one was supplied in the response.
+ session, ok := resp.Header[headerKeySession]
+ if ok && len(session) > 0 {
+ SessionId = session[0]
+ }
+
+ if resp != nil && (resp.StatusCode < 200 || resp.StatusCode >= 300) {
+ return nil, client.UnwrapError(resp)
+ }
+
+ var locations []ApiResourceLocation
+ err = client.UnmarshalCollectionBody(resp, &locations)
+
+ return locations, err
+}
+
+// Examples of api-version: 5.1, 5.1-preview, 5.1-preview.1
+var apiVersionRegEx = regexp.MustCompile(`(\d+(\.\d)?)(-preview(.(\d+))?)?`)
+
+func combineUrl(part1 string, part2 string) string {
+ return strings.TrimRight(part1, "/") + "/" + strings.TrimLeft(part2, "/")
+}
+
+func transformRouteTemplate(routeTemplate string, routeValues map[string]string) string {
+ newTemplate := ""
+ routeTemplate = strings.Replace(routeTemplate, "{*", "{", -1)
+ segments := strings.Split(routeTemplate, "/")
+ for _, segment := range segments {
+ length := len(segment)
+ if length <= 2 || segment[0] != '{' || segment[length-1] != '}' {
+ newTemplate += "/" + segment
+ } else {
+ value, ok := routeValues[segment[1:length-1]]
+ if ok {
+ newTemplate += "/" + url.PathEscape(value)
+ }
+ // else this is an optional parameter that has not been supplied, so don't add it back
+ }
+ }
+ // following covers oddball templates with segments that include the token and additional constants
+ for key, value := range routeValues {
+ newTemplate = strings.Replace(newTemplate, "{"+key+"}", value, -1)
+ }
+ return newTemplate
+}
+
+func (client *Client) UnmarshalBody(response *http.Response, v interface{}) (err error) {
+ if response != nil && response.Body != nil {
+ var err error
+ defer func() {
+ if closeError := response.Body.Close(); closeError != nil {
+ err = closeError
+ }
+ }()
+ body, err := ioutil.ReadAll(response.Body)
+ if err != nil {
+ return err
+ }
+ body = trimByteOrderMark(body)
+ return json.Unmarshal(body, &v)
+ }
+ return nil
+}
+
+func (client *Client) UnmarshalCollectionBody(response *http.Response, v interface{}) (err error) {
+ if response != nil && response.Body != nil {
+ var err error
+ defer func() {
+ if closeError := response.Body.Close(); closeError != nil {
+ err = closeError
+ }
+ }()
+ body, err := ioutil.ReadAll(response.Body)
+ if err != nil {
+ return err
+ }
+
+ body = trimByteOrderMark(body)
+ err = client.UnmarshalCollectionJson(body, v)
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func (client *Client) UnmarshalCollectionJson(jsonValue []byte, v interface{}) (err error) {
+ t := reflect.TypeOf(v)
+ if t.Kind() == reflect.Ptr {
+ t = t.Elem()
+ } else {
+ return errors.New("value type must be a pointer")
+ }
+ sType := reflect.StructOf([]reflect.StructField{
+ {Name: "Count", Type: reflect.TypeOf(0)},
+ {Name: "Value", Type: t},
+ })
+ sv := reflect.New(sType)
+ err = json.Unmarshal(jsonValue, sv.Interface())
+ if err != nil {
+ return err
+ }
+
+ rv := reflect.ValueOf(v)
+ rv.Elem().Set(sv.Elem().FieldByName("Value"))
+ return nil
+}
+
+// Returns slice of body without utf-8 byte order mark.
+// If BOM does not exist body is returned unchanged.
+func trimByteOrderMark(body []byte) []byte {
+ return bytes.TrimPrefix(body, []byte("\xef\xbb\xbf"))
+}
+
+func (client *Client) UnwrapError(response *http.Response) (err error) {
+ if response.ContentLength == 0 {
+ message := "Request returned status: " + response.Status
+ return &WrappedError{
+ Message: &message,
+ StatusCode: &response.StatusCode,
+ }
+ }
+
+ defer func() {
+ if closeError := response.Body.Close(); closeError != nil {
+ err = closeError
+ }
+ }()
+
+ body, err := ioutil.ReadAll(response.Body)
+ if err != nil {
+ return err
+ }
+
+ body = trimByteOrderMark(body)
+
+ contentType, ok := response.Header[headerKeyContentType]
+ if ok && len(contentType) > 0 && strings.Index(contentType[0], MediaTypeTextPlain) >= 0 {
+ message := string(body)
+ statusCode := response.StatusCode
+ return WrappedError{Message: &message, StatusCode: &statusCode}
+ }
+
+ var wrappedError WrappedError
+ err = json.Unmarshal(body, &wrappedError)
+ wrappedError.StatusCode = &response.StatusCode
+ if err != nil {
+ return err
+ }
+
+ if wrappedError.Message == nil {
+ var wrappedImproperError WrappedImproperError
+ err = json.Unmarshal(body, &wrappedImproperError)
+ if err == nil && wrappedImproperError.Value != nil && wrappedImproperError.Value.Message != nil {
+ return &WrappedError{
+ Message: wrappedImproperError.Value.Message,
+ StatusCode: &response.StatusCode,
+ }
+ }
+ }
+
+ return wrappedError
+}
+
+func (client *Client) GetResourceAreas(ctx context.Context) (*[]ResourceAreaInfo, error) {
+ queryParams := url.Values{}
+ locationId, _ := uuid.Parse("e81700f7-3be2-46de-8624-2eb35882fcaa")
+ resp, err := client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", nil, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []ResourceAreaInfo
+ err = client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+type LocationIdNotRegisteredError struct {
+ LocationId uuid.UUID
+ Url string
+}
+
+func (e LocationIdNotRegisteredError) Error() string {
+ return "API resource location " + e.LocationId.String() + " is not registered on " + e.Url + "."
+}
+
+type InvalidApiVersion struct {
+ ApiVersion string
+}
+
+func (e InvalidApiVersion) Error() string {
+ return "The requested api-version is not in a valid format: " + e.ApiVersion
+}
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/client_options.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/client_options.go
new file mode 100644
index 000000000..315288f6e
--- /dev/null
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/client_options.go
@@ -0,0 +1,15 @@
+package azuredevops
+
+import (
+ "net/http"
+)
+
+// ClientOptionFunc can be used customize a new AzureDevops API client.
+type ClientOptionFunc func(*Client)
+
+// WithHTTPClient can be used to configure a custom HTTP client.
+func WithHTTPClient(httpClient *http.Client) ClientOptionFunc {
+ return func(c *Client) {
+ c.client = httpClient
+ }
+}
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/commerce/models.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/commerce/models.go
similarity index 99%
rename from vendor/github.com/microsoft/azure-devops-go-api/azuredevops/commerce/models.go
rename to vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/commerce/models.go
index 7a8a6ba98..20a1418f1 100644
--- a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/commerce/models.go
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/commerce/models.go
@@ -10,7 +10,7 @@ package commerce
import (
"github.com/google/uuid"
- "github.com/microsoft/azure-devops-go-api/azuredevops"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6"
)
// The subscription account namespace. Denotes the 'category' of the account.
@@ -129,6 +129,19 @@ type ConnectedServerAuthorization struct {
PublicKey *string `json:"publicKey,omitempty"`
}
+// Default access level
+type DefaultAccessLevel string
+
+type defaultAccessLevelValuesType struct {
+ Stakeholder DefaultAccessLevel
+ Basic DefaultAccessLevel
+}
+
+var DefaultAccessLevelValues = defaultAccessLevelValuesType{
+ Stakeholder: "stakeholder",
+ Basic: "basic",
+}
+
type IAzureSubscription struct {
AnniversaryDay *int `json:"anniversaryDay,omitempty"`
Created *azuredevops.Time `json:"created,omitempty"`
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/connection.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/connection.go
new file mode 100644
index 000000000..eb76f53c7
--- /dev/null
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/connection.go
@@ -0,0 +1,157 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package azuredevops
+
+import (
+ "context"
+ "crypto/tls"
+ "encoding/base64"
+ "strings"
+ "sync"
+ "time"
+
+ "github.com/google/uuid"
+)
+
+// Creates a new Azure DevOps connection instance using a personal access token.
+func NewPatConnection(organizationUrl string, personalAccessToken string) *Connection {
+ authorizationString := CreateBasicAuthHeaderValue("", personalAccessToken)
+ organizationUrl = normalizeUrl(organizationUrl)
+ return &Connection{
+ AuthorizationString: authorizationString,
+ BaseUrl: organizationUrl,
+ SuppressFedAuthRedirect: true,
+ }
+}
+
+func NewAnonymousConnection(organizationUrl string) *Connection {
+ organizationUrl = normalizeUrl(organizationUrl)
+ return &Connection{
+ BaseUrl: organizationUrl,
+ SuppressFedAuthRedirect: true,
+ }
+}
+
+type Connection struct {
+ AuthorizationString string
+ BaseUrl string
+ UserAgent string
+ SuppressFedAuthRedirect bool
+ ForceMsaPassThrough bool
+ Timeout *time.Duration
+ TlsConfig *tls.Config
+ clientCache map[string]Client
+ clientCacheLock sync.RWMutex
+ resourceAreaCache map[uuid.UUID]ResourceAreaInfo
+ resourceAreaCacheLock sync.RWMutex
+}
+
+func CreateBasicAuthHeaderValue(username, password string) string {
+ auth := username + ":" + password
+ return "Basic " + base64.StdEncoding.EncodeToString([]byte(auth))
+}
+
+func normalizeUrl(url string) string {
+ return strings.ToLower(strings.TrimRight(url, "/"))
+}
+
+func (connection *Connection) GetClientByResourceAreaId(ctx context.Context, resourceAreaID uuid.UUID) (*Client, error) {
+ resourceAreaInfo, err := connection.getResourceAreaInfo(ctx, resourceAreaID)
+ if err != nil {
+ return nil, err
+ }
+ var client *Client
+ if resourceAreaInfo != nil {
+ client = connection.GetClientByUrl(*resourceAreaInfo.LocationUrl)
+ } else {
+ // resourceAreaInfo will be nil for on prem servers
+ client = connection.GetClientByUrl(connection.BaseUrl)
+ }
+ return client, nil
+}
+
+func (connection *Connection) GetClientByUrl(baseUrl string) *Client {
+ normalizedUrl := normalizeUrl(baseUrl)
+ azureDevOpsClient, ok := connection.getClientCacheEntry(normalizedUrl)
+ if !ok {
+ azureDevOpsClient = NewClient(connection, normalizedUrl)
+ connection.setClientCacheEntry(normalizedUrl, azureDevOpsClient)
+ }
+ return azureDevOpsClient
+}
+
+func (connection *Connection) getResourceAreaInfo(ctx context.Context, resourceAreaId uuid.UUID) (*ResourceAreaInfo, error) {
+ resourceAreaInfo, ok := connection.getResourceAreaCacheEntry(resourceAreaId)
+ if !ok {
+ client := connection.GetClientByUrl(connection.BaseUrl)
+ resourceAreaInfos, err := client.GetResourceAreas(ctx)
+ if err != nil {
+ return nil, err
+ }
+
+ if len(*resourceAreaInfos) > 0 {
+ for _, resourceEntry := range *resourceAreaInfos {
+ connection.setResourceAreaCacheEntry(*resourceEntry.Id, &resourceEntry)
+ }
+ resourceAreaInfo, ok = connection.getResourceAreaCacheEntry(resourceAreaId)
+ } else {
+ // on prem servers return an empty list
+ return nil, nil
+ }
+ }
+
+ if ok {
+ return resourceAreaInfo, nil
+ }
+
+ return nil, &ResourceAreaIdNotRegisteredError{resourceAreaId, connection.BaseUrl}
+}
+
+// Client Cache by Url
+func (connection *Connection) getClientCacheEntry(url string) (*Client, bool) {
+ if connection.clientCache == nil {
+ return nil, false
+ }
+ connection.clientCacheLock.RLock()
+ defer connection.clientCacheLock.RUnlock()
+ client, ok := connection.clientCache[url]
+ return &client, ok
+}
+
+func (connection *Connection) setClientCacheEntry(url string, client *Client) {
+ connection.clientCacheLock.Lock()
+ defer connection.clientCacheLock.Unlock()
+ if connection.clientCache == nil {
+ connection.clientCache = make(map[string]Client)
+ }
+ connection.clientCache[url] = *client
+}
+
+func (connection *Connection) getResourceAreaCacheEntry(resourceAreaId uuid.UUID) (*ResourceAreaInfo, bool) {
+ if connection.resourceAreaCache == nil {
+ return nil, false
+ }
+ connection.resourceAreaCacheLock.RLock()
+ defer connection.resourceAreaCacheLock.RUnlock()
+ resourceAreaInfo, ok := connection.resourceAreaCache[resourceAreaId]
+ return &resourceAreaInfo, ok
+}
+
+func (connection *Connection) setResourceAreaCacheEntry(resourceAreaId uuid.UUID, resourceAreaInfo *ResourceAreaInfo) {
+ connection.resourceAreaCacheLock.Lock()
+ defer connection.resourceAreaCacheLock.Unlock()
+ if connection.resourceAreaCache == nil {
+ connection.resourceAreaCache = make(map[uuid.UUID]ResourceAreaInfo)
+ }
+ connection.resourceAreaCache[resourceAreaId] = *resourceAreaInfo
+}
+
+type ResourceAreaIdNotRegisteredError struct {
+ ResourceAreaId uuid.UUID
+ Url string
+}
+
+func (e ResourceAreaIdNotRegisteredError) Error() string {
+ return "API resource area Id " + e.ResourceAreaId.String() + " is not registered on " + e.Url + "."
+}
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/core/client.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/core/client.go
similarity index 94%
rename from vendor/github.com/microsoft/azure-devops-go-api/azuredevops/core/client.go
rename to vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/core/client.go
index edddd3a7e..3456ebc02 100644
--- a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/core/client.go
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/core/client.go
@@ -13,9 +13,9 @@ import (
"context"
"encoding/json"
"github.com/google/uuid"
- "github.com/microsoft/azure-devops-go-api/azuredevops"
- "github.com/microsoft/azure-devops-go-api/azuredevops/operations"
- "github.com/microsoft/azure-devops-go-api/azuredevops/webapi"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/operations"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/webapi"
"net/http"
"net/url"
"strconv"
@@ -109,7 +109,7 @@ func (client *ClientImpl) CreateConnectedService(ctx context.Context, args Creat
return nil, marshalErr
}
locationId, _ := uuid.Parse("b4f70219-e18b-42c5-abe3-98b07d35525e")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -137,7 +137,7 @@ func (client *ClientImpl) CreateOrUpdateProxy(ctx context.Context, args CreateOr
return nil, marshalErr
}
locationId, _ := uuid.Parse("ec1f4311-f2b4-4c15-b2b8-8990b80d2908")
- resp, err := client.Client.Send(ctx, http.MethodPut, locationId, "5.1-preview.2", nil, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPut, locationId, "6.0-preview.2", nil, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -169,7 +169,7 @@ func (client *ClientImpl) CreateTeam(ctx context.Context, args CreateTeamArgs) (
return nil, marshalErr
}
locationId, _ := uuid.Parse("d30a3dd1-f8ba-442a-b86a-bd0c0c383e59")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -198,7 +198,7 @@ func (client *ClientImpl) DeleteProxy(ctx context.Context, args DeleteProxyArgs)
queryParams.Add("site", *args.Site)
}
locationId, _ := uuid.Parse("ec1f4311-f2b4-4c15-b2b8-8990b80d2908")
- _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1-preview.2", nil, queryParams, nil, "", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0-preview.2", nil, queryParams, nil, "", "application/json", nil)
if err != nil {
return err
}
@@ -227,7 +227,7 @@ func (client *ClientImpl) DeleteTeam(ctx context.Context, args DeleteTeamArgs) e
routeValues["teamId"] = *args.TeamId
locationId, _ := uuid.Parse("d30a3dd1-f8ba-442a-b86a-bd0c0c383e59")
- _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return err
}
@@ -259,7 +259,7 @@ func (client *ClientImpl) GetAllTeams(ctx context.Context, args GetAllTeamsArgs)
queryParams.Add("$expandIdentity", strconv.FormatBool(*args.ExpandIdentity))
}
locationId, _ := uuid.Parse("7a4d9ee9-3433-4347-b47a-7a80f1cf307e")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.3", nil, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.3", nil, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -294,7 +294,7 @@ func (client *ClientImpl) GetConnectedServiceDetails(ctx context.Context, args G
routeValues["name"] = *args.Name
locationId, _ := uuid.Parse("b4f70219-e18b-42c5-abe3-98b07d35525e")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -325,7 +325,7 @@ func (client *ClientImpl) GetConnectedServices(ctx context.Context, args GetConn
queryParams.Add("kind", string(*args.Kind))
}
locationId, _ := uuid.Parse("b4f70219-e18b-42c5-abe3-98b07d35525e")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -352,7 +352,7 @@ func (client *ClientImpl) GetProcessById(ctx context.Context, args GetProcessByI
routeValues["processId"] = (*args.ProcessId).String()
locationId, _ := uuid.Parse("93878975-88c5-4e6a-8abb-7ddd77a8a7d8")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -371,7 +371,7 @@ type GetProcessByIdArgs struct {
// Get a list of processes.
func (client *ClientImpl) GetProcesses(ctx context.Context, args GetProcessesArgs) (*[]Process, error) {
locationId, _ := uuid.Parse("93878975-88c5-4e6a-8abb-7ddd77a8a7d8")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", nil, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", nil, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -401,7 +401,7 @@ func (client *ClientImpl) GetProject(ctx context.Context, args GetProjectArgs) (
queryParams.Add("includeHistory", strconv.FormatBool(*args.IncludeHistory))
}
locationId, _ := uuid.Parse("603fe2ac-9723-48b9-88ad-09305aa6c6e1")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -430,7 +430,7 @@ func (client *ClientImpl) GetProjectCollection(ctx context.Context, args GetProj
routeValues["collectionId"] = *args.CollectionId
locationId, _ := uuid.Parse("8031090f-ef1d-4af6-85fc-698cd75d42bf")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -456,7 +456,7 @@ func (client *ClientImpl) GetProjectCollections(ctx context.Context, args GetPro
queryParams.Add("$skip", strconv.Itoa(*args.Skip))
}
locationId, _ := uuid.Parse("8031090f-ef1d-4af6-85fc-698cd75d42bf")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", nil, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", nil, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -488,7 +488,7 @@ func (client *ClientImpl) GetProjectProperties(ctx context.Context, args GetProj
queryParams.Add("keys", listAsString)
}
locationId, _ := uuid.Parse("4976a71a-4487-49aa-8aab-a1eda469037a")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -525,7 +525,7 @@ func (client *ClientImpl) GetProjects(ctx context.Context, args GetProjectsArgs)
queryParams.Add("getDefaultTeamImageUrl", strconv.FormatBool(*args.GetDefaultTeamImageUrl))
}
locationId, _ := uuid.Parse("603fe2ac-9723-48b9-88ad-09305aa6c6e1")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", nil, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", nil, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -552,8 +552,7 @@ type GetProjectsArgs struct {
// Return type for the GetProjects function
type GetProjectsResponseValue struct {
- Value []TeamProjectReference
- // The continuation token to be used to get the next page of results.
+ Value []TeamProjectReference
ContinuationToken string
}
@@ -564,7 +563,7 @@ func (client *ClientImpl) GetProxies(ctx context.Context, args GetProxiesArgs) (
queryParams.Add("proxyUrl", *args.ProxyUrl)
}
locationId, _ := uuid.Parse("ec1f4311-f2b4-4c15-b2b8-8990b80d2908")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.2", nil, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.2", nil, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -597,7 +596,7 @@ func (client *ClientImpl) GetTeam(ctx context.Context, args GetTeamArgs) (*WebAp
queryParams.Add("$expandIdentity", strconv.FormatBool(*args.ExpandIdentity))
}
locationId, _ := uuid.Parse("d30a3dd1-f8ba-442a-b86a-bd0c0c383e59")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -637,7 +636,7 @@ func (client *ClientImpl) GetTeamMembersWithExtendedProperties(ctx context.Conte
queryParams.Add("$skip", strconv.Itoa(*args.Skip))
}
locationId, _ := uuid.Parse("294c494c-2600-4d7e-b76c-3dd50c3c95be")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -681,7 +680,7 @@ func (client *ClientImpl) GetTeams(ctx context.Context, args GetTeamsArgs) (*[]W
queryParams.Add("$expandIdentity", strconv.FormatBool(*args.ExpandIdentity))
}
locationId, _ := uuid.Parse("d30a3dd1-f8ba-442a-b86a-bd0c0c383e59")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -715,7 +714,7 @@ func (client *ClientImpl) QueueCreateProject(ctx context.Context, args QueueCrea
return nil, marshalErr
}
locationId, _ := uuid.Parse("603fe2ac-9723-48b9-88ad-09305aa6c6e1")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1", nil, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0", nil, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -740,7 +739,7 @@ func (client *ClientImpl) QueueDeleteProject(ctx context.Context, args QueueDele
routeValues["projectId"] = (*args.ProjectId).String()
locationId, _ := uuid.Parse("603fe2ac-9723-48b9-88ad-09305aa6c6e1")
- resp, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -765,7 +764,7 @@ func (client *ClientImpl) RemoveProjectAvatar(ctx context.Context, args RemovePr
routeValues["projectId"] = *args.ProjectId
locationId, _ := uuid.Parse("54b2a2a0-859b-4d05-827c-ec4c862f641a")
- _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return err
}
@@ -795,7 +794,7 @@ func (client *ClientImpl) SetProjectAvatar(ctx context.Context, args SetProjectA
return marshalErr
}
locationId, _ := uuid.Parse("54b2a2a0-859b-4d05-827c-ec4c862f641a")
- _, err := client.Client.Send(ctx, http.MethodPut, locationId, "5.1-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodPut, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return err
}
@@ -827,7 +826,7 @@ func (client *ClientImpl) SetProjectProperties(ctx context.Context, args SetProj
return marshalErr
}
locationId, _ := uuid.Parse("4976a71a-4487-49aa-8aab-a1eda469037a")
- _, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1-preview.1", routeValues, nil, bytes.NewReader(body), "application/json-patch+json", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json-patch+json", "application/json", nil)
if err != nil {
return err
}
@@ -859,7 +858,7 @@ func (client *ClientImpl) UpdateProject(ctx context.Context, args UpdateProjectA
return nil, marshalErr
}
locationId, _ := uuid.Parse("603fe2ac-9723-48b9-88ad-09305aa6c6e1")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -897,7 +896,7 @@ func (client *ClientImpl) UpdateTeam(ctx context.Context, args UpdateTeamArgs) (
return nil, marshalErr
}
locationId, _ := uuid.Parse("d30a3dd1-f8ba-442a-b86a-bd0c0c383e59")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/core/models.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/core/models.go
similarity index 98%
rename from vendor/github.com/microsoft/azure-devops-go-api/azuredevops/core/models.go
rename to vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/core/models.go
index e75641040..57b573594 100644
--- a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/core/models.go
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/core/models.go
@@ -10,9 +10,9 @@ 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"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/identity"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/webapi"
)
type ConnectedServiceKind string
@@ -53,11 +53,14 @@ type Process struct {
type ProcessCustomizationType string
type processCustomizationTypeValuesType struct {
+ Unknown ProcessCustomizationType
Xml ProcessCustomizationType
Inherited ProcessCustomizationType
}
var ProcessCustomizationTypeValues = processCustomizationTypeValuesType{
+ // Process customization can't be computed.
+ Unknown: "unknown",
// Customization based on project-scoped xml customization
Xml: "xml",
// Customization based on process inheritance
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/delegatedauthorization/models.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/delegatedauthorization/models.go
new file mode 100644
index 000000000..93e2630ae
--- /dev/null
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/delegatedauthorization/models.go
@@ -0,0 +1,425 @@
+// --------------------------------------------------------------------------------------------
+// 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 delegatedauthorization
+
+import (
+ "github.com/google/uuid"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/webapi"
+)
+
+type AccessTokenResult struct {
+ AccessToken *webapi.JsonWebToken `json:"accessToken,omitempty"`
+ AccessTokenError *TokenError `json:"accessTokenError,omitempty"`
+ AuthorizationId *uuid.UUID `json:"authorizationId,omitempty"`
+ ErrorDescription *string `json:"errorDescription,omitempty"`
+ HasError *bool `json:"hasError,omitempty"`
+ IsFirstPartyClient *bool `json:"isFirstPartyClient,omitempty"`
+ RefreshToken *RefreshTokenGrant `json:"refreshToken,omitempty"`
+ Scope *string `json:"scope,omitempty"`
+ TokenType *string `json:"tokenType,omitempty"`
+ ValidTo *azuredevops.Time `json:"validTo,omitempty"`
+}
+
+type Authorization struct {
+ AccessIssued *azuredevops.Time `json:"accessIssued,omitempty"`
+ Audience *string `json:"audience,omitempty"`
+ AuthorizationId *uuid.UUID `json:"authorizationId,omitempty"`
+ IdentityId *uuid.UUID `json:"identityId,omitempty"`
+ IsAccessUsed *bool `json:"isAccessUsed,omitempty"`
+ IsValid *bool `json:"isValid,omitempty"`
+ RedirectUri *string `json:"redirectUri,omitempty"`
+ RegistrationId *uuid.UUID `json:"registrationId,omitempty"`
+ Scopes *string `json:"scopes,omitempty"`
+ Source *string `json:"source,omitempty"`
+ ValidFrom *azuredevops.Time `json:"validFrom,omitempty"`
+ ValidTo *azuredevops.Time `json:"validTo,omitempty"`
+}
+
+type AuthorizationDecision struct {
+ Authorization *Authorization `json:"authorization,omitempty"`
+ AuthorizationError *AuthorizationError `json:"authorizationError,omitempty"`
+ AuthorizationGrant *AuthorizationGrant `json:"authorizationGrant,omitempty"`
+ HasError *bool `json:"hasError,omitempty"`
+ IsAuthorized *bool `json:"isAuthorized,omitempty"`
+}
+
+type AuthorizationDescription struct {
+ ClientRegistration *Registration `json:"clientRegistration,omitempty"`
+ HasError *bool `json:"hasError,omitempty"`
+ InitiationError *InitiationError `json:"initiationError,omitempty"`
+ ScopeDescriptions *[]AuthorizationScopeDescription `json:"scopeDescriptions,omitempty"`
+}
+
+type AuthorizationDetails struct {
+ Authorization *Authorization `json:"authorization,omitempty"`
+ ClientRegistration *Registration `json:"clientRegistration,omitempty"`
+ ScopeDescriptions *[]AuthorizationScopeDescription `json:"scopeDescriptions,omitempty"`
+}
+
+type AuthorizationError string
+
+type authorizationErrorValuesType struct {
+ None AuthorizationError
+ ClientIdRequired AuthorizationError
+ InvalidClientId AuthorizationError
+ ResponseTypeRequired AuthorizationError
+ ResponseTypeNotSupported AuthorizationError
+ ScopeRequired AuthorizationError
+ InvalidScope AuthorizationError
+ RedirectUriRequired AuthorizationError
+ InsecureRedirectUri AuthorizationError
+ InvalidRedirectUri AuthorizationError
+ InvalidUserId AuthorizationError
+ InvalidUserType AuthorizationError
+ AccessDenied AuthorizationError
+}
+
+var AuthorizationErrorValues = authorizationErrorValuesType{
+ None: "none",
+ ClientIdRequired: "clientIdRequired",
+ InvalidClientId: "invalidClientId",
+ ResponseTypeRequired: "responseTypeRequired",
+ ResponseTypeNotSupported: "responseTypeNotSupported",
+ ScopeRequired: "scopeRequired",
+ InvalidScope: "invalidScope",
+ RedirectUriRequired: "redirectUriRequired",
+ InsecureRedirectUri: "insecureRedirectUri",
+ InvalidRedirectUri: "invalidRedirectUri",
+ InvalidUserId: "invalidUserId",
+ InvalidUserType: "invalidUserType",
+ AccessDenied: "accessDenied",
+}
+
+type AuthorizationGrant struct {
+ GrantType *GrantType `json:"grantType,omitempty"`
+}
+
+type AuthorizationScopeDescription struct {
+ Description *string `json:"description,omitempty"`
+ Market *string `json:"market,omitempty"`
+ Title *string `json:"title,omitempty"`
+}
+
+type ClientType string
+
+type clientTypeValuesType struct {
+ Confidential ClientType
+ Public ClientType
+ MediumTrust ClientType
+ HighTrust ClientType
+ FullTrust ClientType
+ Application ClientType
+}
+
+var ClientTypeValues = clientTypeValuesType{
+ Confidential: "confidential",
+ Public: "public",
+ MediumTrust: "mediumTrust",
+ HighTrust: "highTrust",
+ FullTrust: "fullTrust",
+ Application: "application",
+}
+
+type GrantType string
+
+type grantTypeValuesType struct {
+ None GrantType
+ JwtBearer GrantType
+ RefreshToken GrantType
+ Implicit GrantType
+ ClientCredentials GrantType
+}
+
+var GrantTypeValues = grantTypeValuesType{
+ None: "none",
+ JwtBearer: "jwtBearer",
+ RefreshToken: "refreshToken",
+ Implicit: "implicit",
+ ClientCredentials: "clientCredentials",
+}
+
+type HostAuthorization struct {
+ HostId *uuid.UUID `json:"hostId,omitempty"`
+ Id *uuid.UUID `json:"id,omitempty"`
+ IsValid *bool `json:"isValid,omitempty"`
+ RegistrationId *uuid.UUID `json:"registrationId,omitempty"`
+}
+
+type HostAuthorizationDecision struct {
+ ClientType *ClientType `json:"clientType,omitempty"`
+ HasError *bool `json:"hasError,omitempty"`
+ HostAuthorizationError *HostAuthorizationError `json:"hostAuthorizationError,omitempty"`
+ HostAuthorizationId *uuid.UUID `json:"hostAuthorizationId,omitempty"`
+ RegistrationId *uuid.UUID `json:"registrationId,omitempty"`
+ RegistrationName *string `json:"registrationName,omitempty"`
+ SetupUri *string `json:"setupUri,omitempty"`
+}
+
+type HostAuthorizationError string
+
+type hostAuthorizationErrorValuesType struct {
+ None HostAuthorizationError
+ ClientIdRequired HostAuthorizationError
+ AccessDenied HostAuthorizationError
+ FailedToAuthorizeHost HostAuthorizationError
+ ClientIdNotFound HostAuthorizationError
+ InvalidClientId HostAuthorizationError
+}
+
+var HostAuthorizationErrorValues = hostAuthorizationErrorValuesType{
+ None: "none",
+ ClientIdRequired: "clientIdRequired",
+ AccessDenied: "accessDenied",
+ FailedToAuthorizeHost: "failedToAuthorizeHost",
+ ClientIdNotFound: "clientIdNotFound",
+ InvalidClientId: "invalidClientId",
+}
+
+type InitiationError string
+
+type initiationErrorValuesType struct {
+ None InitiationError
+ ClientIdRequired InitiationError
+ InvalidClientId InitiationError
+ ResponseTypeRequired InitiationError
+ ResponseTypeNotSupported InitiationError
+ ScopeRequired InitiationError
+ InvalidScope InitiationError
+ RedirectUriRequired InitiationError
+ InsecureRedirectUri InitiationError
+ InvalidRedirectUri InitiationError
+}
+
+var InitiationErrorValues = initiationErrorValuesType{
+ None: "none",
+ ClientIdRequired: "clientIdRequired",
+ InvalidClientId: "invalidClientId",
+ ResponseTypeRequired: "responseTypeRequired",
+ ResponseTypeNotSupported: "responseTypeNotSupported",
+ ScopeRequired: "scopeRequired",
+ InvalidScope: "invalidScope",
+ RedirectUriRequired: "redirectUriRequired",
+ InsecureRedirectUri: "insecureRedirectUri",
+ InvalidRedirectUri: "invalidRedirectUri",
+}
+
+type RefreshTokenGrant struct {
+ GrantType *GrantType `json:"grantType,omitempty"`
+ Jwt *webapi.JsonWebToken `json:"jwt,omitempty"`
+}
+
+type Registration struct {
+ AccessHash *string `json:"accessHash,omitempty"`
+ ClientType *ClientType `json:"clientType,omitempty"`
+ IdentityId *uuid.UUID `json:"identityId,omitempty"`
+ Issuer *string `json:"issuer,omitempty"`
+ IsValid *bool `json:"isValid,omitempty"`
+ IsWellKnown *bool `json:"isWellKnown,omitempty"`
+ OrganizationLocation *string `json:"organizationLocation,omitempty"`
+ OrganizationName *string `json:"organizationName,omitempty"`
+ // Raw cert data string from public key. This will be used for authenticating medium trust clients.
+ PublicKey *string `json:"publicKey,omitempty"`
+ RedirectUris *[]string `json:"redirectUris,omitempty"`
+ RegistrationDescription *string `json:"registrationDescription,omitempty"`
+ RegistrationId *uuid.UUID `json:"registrationId,omitempty"`
+ RegistrationLocation *string `json:"registrationLocation,omitempty"`
+ RegistrationLogoSecureLocation *string `json:"registrationLogoSecureLocation,omitempty"`
+ RegistrationName *string `json:"registrationName,omitempty"`
+ RegistrationPrivacyStatementLocation *string `json:"registrationPrivacyStatementLocation,omitempty"`
+ RegistrationTermsOfServiceLocation *string `json:"registrationTermsOfServiceLocation,omitempty"`
+ ResponseTypes *string `json:"responseTypes,omitempty"`
+ Scopes *string `json:"scopes,omitempty"`
+ Secret *string `json:"secret,omitempty"`
+ SecretValidTo *azuredevops.Time `json:"secretValidTo,omitempty"`
+ SecretVersionId *uuid.UUID `json:"secretVersionId,omitempty"`
+ SetupUri *string `json:"setupUri,omitempty"`
+ TenantIds *[]uuid.UUID `json:"tenantIds,omitempty"`
+ ValidFrom *azuredevops.Time `json:"validFrom,omitempty"`
+}
+
+type ResponseType string
+
+type responseTypeValuesType struct {
+ None ResponseType
+ Assertion ResponseType
+ IdToken ResponseType
+ TenantPicker ResponseType
+ SignoutToken ResponseType
+ AppToken ResponseType
+ Code ResponseType
+}
+
+var ResponseTypeValues = responseTypeValuesType{
+ None: "none",
+ Assertion: "assertion",
+ IdToken: "idToken",
+ TenantPicker: "tenantPicker",
+ SignoutToken: "signoutToken",
+ AppToken: "appToken",
+ Code: "code",
+}
+
+type SessionToken struct {
+ AccessId *uuid.UUID `json:"accessId,omitempty"`
+ // This is populated when user requests a compact token. The alternate token value is self describing token.
+ AlternateToken *string `json:"alternateToken,omitempty"`
+ AuthorizationId *uuid.UUID `json:"authorizationId,omitempty"`
+ Claims *map[string]string `json:"claims,omitempty"`
+ ClientId *uuid.UUID `json:"clientId,omitempty"`
+ DisplayName *string `json:"displayName,omitempty"`
+ HostAuthorizationId *uuid.UUID `json:"hostAuthorizationId,omitempty"`
+ IsPublic *bool `json:"isPublic,omitempty"`
+ IsValid *bool `json:"isValid,omitempty"`
+ PublicData *string `json:"publicData,omitempty"`
+ Scope *string `json:"scope,omitempty"`
+ Source *string `json:"source,omitempty"`
+ TargetAccounts *[]uuid.UUID `json:"targetAccounts,omitempty"`
+ // This is computed and not returned in Get queries
+ Token *string `json:"token,omitempty"`
+ UserId *uuid.UUID `json:"userId,omitempty"`
+ ValidFrom *azuredevops.Time `json:"validFrom,omitempty"`
+ ValidTo *azuredevops.Time `json:"validTo,omitempty"`
+}
+
+type SessionTokenError string
+
+type sessionTokenErrorValuesType struct {
+ None SessionTokenError
+ DisplayNameRequired SessionTokenError
+ InvalidDisplayName SessionTokenError
+ InvalidValidTo SessionTokenError
+ InvalidScope SessionTokenError
+ UserIdRequired SessionTokenError
+ InvalidUserId SessionTokenError
+ InvalidUserType SessionTokenError
+ AccessDenied SessionTokenError
+ FailedToIssueAccessToken SessionTokenError
+ InvalidClient SessionTokenError
+ InvalidClientType SessionTokenError
+ InvalidClientId SessionTokenError
+ InvalidTargetAccounts SessionTokenError
+ HostAuthorizationNotFound SessionTokenError
+ AuthorizationNotFound SessionTokenError
+ FailedToUpdateAccessToken SessionTokenError
+ SourceNotSupported SessionTokenError
+ InvalidSourceIP SessionTokenError
+ InvalidSource SessionTokenError
+ DuplicateHash SessionTokenError
+ SshPolicyDisabled SessionTokenError
+}
+
+var SessionTokenErrorValues = sessionTokenErrorValuesType{
+ None: "none",
+ DisplayNameRequired: "displayNameRequired",
+ InvalidDisplayName: "invalidDisplayName",
+ InvalidValidTo: "invalidValidTo",
+ InvalidScope: "invalidScope",
+ UserIdRequired: "userIdRequired",
+ InvalidUserId: "invalidUserId",
+ InvalidUserType: "invalidUserType",
+ AccessDenied: "accessDenied",
+ FailedToIssueAccessToken: "failedToIssueAccessToken",
+ InvalidClient: "invalidClient",
+ InvalidClientType: "invalidClientType",
+ InvalidClientId: "invalidClientId",
+ InvalidTargetAccounts: "invalidTargetAccounts",
+ HostAuthorizationNotFound: "hostAuthorizationNotFound",
+ AuthorizationNotFound: "authorizationNotFound",
+ FailedToUpdateAccessToken: "failedToUpdateAccessToken",
+ SourceNotSupported: "sourceNotSupported",
+ InvalidSourceIP: "invalidSourceIP",
+ InvalidSource: "invalidSource",
+ DuplicateHash: "duplicateHash",
+ SshPolicyDisabled: "sshPolicyDisabled",
+}
+
+type SessionTokenResult struct {
+ HasError *bool `json:"hasError,omitempty"`
+ SessionToken *SessionToken `json:"sessionToken,omitempty"`
+ SessionTokenError *SessionTokenError `json:"sessionTokenError,omitempty"`
+}
+
+type TokenError string
+
+type tokenErrorValuesType struct {
+ None TokenError
+ GrantTypeRequired TokenError
+ AuthorizationGrantRequired TokenError
+ ClientSecretRequired TokenError
+ RedirectUriRequired TokenError
+ InvalidAuthorizationGrant TokenError
+ InvalidAuthorizationScopes TokenError
+ InvalidRefreshToken TokenError
+ AuthorizationNotFound TokenError
+ AuthorizationGrantExpired TokenError
+ AccessAlreadyIssued TokenError
+ InvalidRedirectUri TokenError
+ AccessTokenNotFound TokenError
+ InvalidAccessToken TokenError
+ AccessTokenAlreadyRefreshed TokenError
+ InvalidClientSecret TokenError
+ ClientSecretExpired TokenError
+ ServerError TokenError
+ AccessDenied TokenError
+ AccessTokenKeyRequired TokenError
+ InvalidAccessTokenKey TokenError
+ FailedToGetAccessToken TokenError
+ InvalidClientId TokenError
+ InvalidClient TokenError
+ InvalidValidTo TokenError
+ InvalidUserId TokenError
+ FailedToIssueAccessToken TokenError
+ AuthorizationGrantScopeMissing TokenError
+ InvalidPublicAccessTokenKey TokenError
+ InvalidPublicAccessToken TokenError
+ PublicFeatureFlagNotEnabled TokenError
+ SshPolicyDisabled TokenError
+ HostAuthorizationNotFound TokenError
+ HostAuthorizationIsNotValid TokenError
+ InvalidScope TokenError
+}
+
+var TokenErrorValues = tokenErrorValuesType{
+ None: "none",
+ GrantTypeRequired: "grantTypeRequired",
+ AuthorizationGrantRequired: "authorizationGrantRequired",
+ ClientSecretRequired: "clientSecretRequired",
+ RedirectUriRequired: "redirectUriRequired",
+ InvalidAuthorizationGrant: "invalidAuthorizationGrant",
+ InvalidAuthorizationScopes: "invalidAuthorizationScopes",
+ InvalidRefreshToken: "invalidRefreshToken",
+ AuthorizationNotFound: "authorizationNotFound",
+ AuthorizationGrantExpired: "authorizationGrantExpired",
+ AccessAlreadyIssued: "accessAlreadyIssued",
+ InvalidRedirectUri: "invalidRedirectUri",
+ AccessTokenNotFound: "accessTokenNotFound",
+ InvalidAccessToken: "invalidAccessToken",
+ AccessTokenAlreadyRefreshed: "accessTokenAlreadyRefreshed",
+ InvalidClientSecret: "invalidClientSecret",
+ ClientSecretExpired: "clientSecretExpired",
+ ServerError: "serverError",
+ AccessDenied: "accessDenied",
+ AccessTokenKeyRequired: "accessTokenKeyRequired",
+ InvalidAccessTokenKey: "invalidAccessTokenKey",
+ FailedToGetAccessToken: "failedToGetAccessToken",
+ InvalidClientId: "invalidClientId",
+ InvalidClient: "invalidClient",
+ InvalidValidTo: "invalidValidTo",
+ InvalidUserId: "invalidUserId",
+ FailedToIssueAccessToken: "failedToIssueAccessToken",
+ AuthorizationGrantScopeMissing: "authorizationGrantScopeMissing",
+ InvalidPublicAccessTokenKey: "invalidPublicAccessTokenKey",
+ InvalidPublicAccessToken: "invalidPublicAccessToken",
+ PublicFeatureFlagNotEnabled: "publicFeatureFlagNotEnabled",
+ SshPolicyDisabled: "sshPolicyDisabled",
+ HostAuthorizationNotFound: "hostAuthorizationNotFound",
+ HostAuthorizationIsNotValid: "hostAuthorizationIsNotValid",
+ InvalidScope: "invalidScope",
+}
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/distributedtaskcommon/models.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/distributedtaskcommon/models.go
similarity index 100%
rename from vendor/github.com/microsoft/azure-devops-go-api/azuredevops/distributedtaskcommon/models.go
rename to vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/distributedtaskcommon/models.go
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/errors.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/errors.go
new file mode 100644
index 000000000..e7cf6a377
--- /dev/null
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/errors.go
@@ -0,0 +1,17 @@
+package azuredevops
+
+type ArgumentNilError struct {
+ ArgumentName string
+}
+
+func (e ArgumentNilError) Error() string {
+ return "Argument " + e.ArgumentName + " can not be nil"
+}
+
+type ArgumentNilOrEmptyError struct {
+ ArgumentName string
+}
+
+func (e ArgumentNilOrEmptyError) Error() string {
+ return "Argument " + e.ArgumentName + " can not be nil or empty"
+}
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/featuremanagement/client.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/featuremanagement/client.go
similarity index 96%
rename from vendor/github.com/microsoft/azure-devops-go-api/azuredevops/featuremanagement/client.go
rename to vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/featuremanagement/client.go
index cab96789c..3df61674c 100644
--- a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/featuremanagement/client.go
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/featuremanagement/client.go
@@ -13,7 +13,7 @@ import (
"context"
"encoding/json"
"github.com/google/uuid"
- "github.com/microsoft/azure-devops-go-api/azuredevops"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6"
"net/http"
"net/url"
)
@@ -59,7 +59,7 @@ func (client *ClientImpl) GetFeature(ctx context.Context, args GetFeatureArgs) (
routeValues["featureId"] = *args.FeatureId
locationId, _ := uuid.Parse("c4209f25-7a27-41dd-9f04-06080c7b6afd")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -82,7 +82,7 @@ func (client *ClientImpl) GetFeatures(ctx context.Context, args GetFeaturesArgs)
queryParams.Add("targetContributionId", *args.TargetContributionId)
}
locationId, _ := uuid.Parse("c4209f25-7a27-41dd-9f04-06080c7b6afd")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", nil, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", nil, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -111,7 +111,7 @@ func (client *ClientImpl) GetFeatureState(ctx context.Context, args GetFeatureSt
routeValues["userScope"] = *args.UserScope
locationId, _ := uuid.Parse("98911314-3f9b-4eaf-80e8-83900d8e85d9")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -150,7 +150,7 @@ func (client *ClientImpl) GetFeatureStateForScope(ctx context.Context, args GetF
routeValues["scopeValue"] = *args.ScopeValue
locationId, _ := uuid.Parse("dd291e43-aa9f-4cee-8465-a93c78e414a4")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -182,7 +182,7 @@ func (client *ClientImpl) QueryFeatureStates(ctx context.Context, args QueryFeat
return nil, marshalErr
}
locationId, _ := uuid.Parse("2b4486ad-122b-400c-ae65-17b6672c1f9d")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.1", nil, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.1", nil, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -214,7 +214,7 @@ func (client *ClientImpl) QueryFeatureStatesForDefaultScope(ctx context.Context,
return nil, marshalErr
}
locationId, _ := uuid.Parse("3f810f28-03e2-4239-b0bc-788add3005e5")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -256,7 +256,7 @@ func (client *ClientImpl) QueryFeatureStatesForNamedScope(ctx context.Context, a
return nil, marshalErr
}
locationId, _ := uuid.Parse("f29e997b-c2da-4d15-8380-765788a1a74c")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -305,7 +305,7 @@ func (client *ClientImpl) SetFeatureState(ctx context.Context, args SetFeatureSt
return nil, marshalErr
}
locationId, _ := uuid.Parse("98911314-3f9b-4eaf-80e8-83900d8e85d9")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1-preview.1", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0-preview.1", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -364,7 +364,7 @@ func (client *ClientImpl) SetFeatureStateForScope(ctx context.Context, args SetF
return nil, marshalErr
}
locationId, _ := uuid.Parse("dd291e43-aa9f-4cee-8465-a93c78e414a4")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1-preview.1", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0-preview.1", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/featuremanagement/models.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/featuremanagement/models.go
similarity index 100%
rename from vendor/github.com/microsoft/azure-devops-go-api/azuredevops/featuremanagement/models.go
rename to vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/featuremanagement/models.go
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/forminput/models.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/forminput/models.go
similarity index 100%
rename from vendor/github.com/microsoft/azure-devops-go-api/azuredevops/forminput/models.go
rename to vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/forminput/models.go
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/git/client.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/git/client.go
similarity index 93%
rename from vendor/github.com/microsoft/azure-devops-go-api/azuredevops/git/client.go
rename to vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/git/client.go
index b8794b7a6..31fd67dba 100644
--- a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/git/client.go
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/git/client.go
@@ -13,10 +13,10 @@ import (
"context"
"encoding/json"
"github.com/google/uuid"
- "github.com/microsoft/azure-devops-go-api/azuredevops"
- "github.com/microsoft/azure-devops-go-api/azuredevops/core"
- "github.com/microsoft/azure-devops-go-api/azuredevops/policy"
- "github.com/microsoft/azure-devops-go-api/azuredevops/webapi"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/core"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/policy"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/webapi"
"io"
"net/http"
"net/url"
@@ -66,6 +66,8 @@ type Client interface {
CreateRevert(context.Context, CreateRevertArgs) (*GitRevert, error)
// Create a thread in a pull request.
CreateThread(context.Context, CreateThreadArgs) (*GitPullRequestCommentThread, error)
+ // Add an unmaterialized identity to the reviewers of a pull request.
+ CreateUnmaterializedPullRequestReviewer(context.Context, CreateUnmaterializedPullRequestReviewerArgs) (*IdentityRefWithVote, error)
// [Preview API] Delete a pull request attachment.
DeleteAttachment(context.Context, DeleteAttachmentArgs) error
// Delete a comment associated with a specific thread in a pull request.
@@ -108,9 +110,9 @@ type Client interface {
GetBranches(context.Context, GetBranchesArgs) (*[]GitBranchStats, error)
// Retrieve changes for a particular commit.
GetChanges(context.Context, GetChangesArgs) (*GitCommitChanges, error)
- // [Preview API] Retrieve information about a cherry pick by cherry pick Id.
+ // [Preview API] Retrieve information about a cherry pick operation by cherry pick Id.
GetCherryPick(context.Context, GetCherryPickArgs) (*GitCherryPick, error)
- // [Preview API] Retrieve information about a cherry pick for a specific branch.
+ // [Preview API] Retrieve information about a cherry pick operation for a specific branch. This operation is expensive due to the underlying object structure, so this API only looks at the 1000 most recent cherry pick operations.
GetCherryPickForRefName(context.Context, GetCherryPickForRefNameArgs) (*GitCherryPick, error)
// Retrieve a comment associated with a specific thread in a pull request.
GetComment(context.Context, GetCommentArgs) (*Comment, error)
@@ -246,6 +248,8 @@ type Client interface {
UpdatePullRequestIterationStatuses(context.Context, UpdatePullRequestIterationStatusesArgs) error
// [Preview API] Create or update pull request external properties. The patch operation can be `add`, `replace` or `remove`. For `add` operation, the path can be empty. If the path is empty, the value must be a list of key value pairs. For `replace` operation, the path cannot be empty. If the path does not exist, the property will be added to the collection. For `remove` operation, the path cannot be empty. If the path does not exist, no action will be performed.
UpdatePullRequestProperties(context.Context, UpdatePullRequestPropertiesArgs) (interface{}, error)
+ // Edit a reviewer entry. These fields are patchable: isFlagged, hasDeclined
+ UpdatePullRequestReviewer(context.Context, UpdatePullRequestReviewerArgs) (*IdentityRefWithVote, error)
// Reset the votes of multiple reviewers on a pull request. NOTE: This endpoint only supports updating votes, but does not support updating required reviewers (use policy) or display names.
UpdatePullRequestReviewers(context.Context, UpdatePullRequestReviewersArgs) error
// [Preview API] Update pull request statuses collection. The only supported operation type is `remove`.
@@ -294,7 +298,7 @@ func (client *ClientImpl) CreateAnnotatedTag(ctx context.Context, args CreateAnn
return nil, marshalErr
}
locationId, _ := uuid.Parse("5e8a8081-3851-4626-b677-9891cc04102e")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -337,7 +341,7 @@ func (client *ClientImpl) CreateAttachment(ctx context.Context, args CreateAttac
routeValues["pullRequestId"] = strconv.Itoa(*args.PullRequestId)
locationId, _ := uuid.Parse("965d9361-878b-413b-a494-45d5b5fd8ab7")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.1", routeValues, nil, args.UploadStream, "application/octet-stream", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.1", routeValues, nil, args.UploadStream, "application/octet-stream", "application/json", nil)
if err != nil {
return nil, err
}
@@ -381,7 +385,7 @@ func (client *ClientImpl) CreateCherryPick(ctx context.Context, args CreateCherr
return nil, marshalErr
}
locationId, _ := uuid.Parse("033bad68-9a14-43d1-90e0-59cb8856fef6")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -428,7 +432,7 @@ func (client *ClientImpl) CreateComment(ctx context.Context, args CreateCommentA
return nil, marshalErr
}
locationId, _ := uuid.Parse("965a3ec7-5ed8-455a-bdcb-835a5ea7fe7b")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -475,7 +479,7 @@ func (client *ClientImpl) CreateCommitStatus(ctx context.Context, args CreateCom
return nil, marshalErr
}
locationId, _ := uuid.Parse("428dd4fb-fda5-4722-af02-9313b80305da")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -513,7 +517,7 @@ func (client *ClientImpl) CreateFavorite(ctx context.Context, args CreateFavorit
return nil, marshalErr
}
locationId, _ := uuid.Parse("876f70af-5792-485a-a1c7-d0a7b2f42bbb")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -554,7 +558,7 @@ func (client *ClientImpl) CreateForkSyncRequest(ctx context.Context, args Create
return nil, marshalErr
}
locationId, _ := uuid.Parse("1703f858-b9d1-46af-ab62-483e9e1055b5")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.1", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.1", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -596,7 +600,7 @@ func (client *ClientImpl) CreateImportRequest(ctx context.Context, args CreateIm
return nil, marshalErr
}
locationId, _ := uuid.Parse("01828ddc-3600-4a41-8633-99b3a73a0eb3")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -640,7 +644,7 @@ func (client *ClientImpl) CreateLike(ctx context.Context, args CreateLikeArgs) e
routeValues["commentId"] = strconv.Itoa(*args.CommentId)
locationId, _ := uuid.Parse("5f2e2851-1389-425b-a00b-fb2adb3ef31b")
- _, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return err
}
@@ -686,7 +690,7 @@ func (client *ClientImpl) CreateMergeRequest(ctx context.Context, args CreateMer
return nil, marshalErr
}
locationId, _ := uuid.Parse("985f7ae9-844f-4906-9897-7ef41516c0e2")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.1", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.1", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -731,7 +735,7 @@ func (client *ClientImpl) CreatePullRequest(ctx context.Context, args CreatePull
return nil, marshalErr
}
locationId, _ := uuid.Parse("9946fd70-0d40-406e-b686-b4744cbbcc37")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -780,7 +784,7 @@ func (client *ClientImpl) CreatePullRequestIterationStatus(ctx context.Context,
return nil, marshalErr
}
locationId, _ := uuid.Parse("75cf11c5-979f-4038-a76e-058a06adf2bf")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -831,7 +835,7 @@ func (client *ClientImpl) CreatePullRequestLabel(ctx context.Context, args Creat
return nil, marshalErr
}
locationId, _ := uuid.Parse("f22387e3-984e-4c52-9c6d-fbb8f14c812d")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.1", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.1", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -882,7 +886,7 @@ func (client *ClientImpl) CreatePullRequestReviewer(ctx context.Context, args Cr
return nil, marshalErr
}
locationId, _ := uuid.Parse("4b6702c7-aa35-4b89-9c96-b9abf6d3e540")
- resp, err := client.Client.Send(ctx, http.MethodPut, locationId, "5.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPut, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -896,7 +900,7 @@ func (client *ClientImpl) CreatePullRequestReviewer(ctx context.Context, args Cr
type CreatePullRequestReviewerArgs struct {
// (required) Reviewer's vote.
If the reviewer's ID is included here, it must match the reviewerID parameter.
Reviewers can set their own vote with this method. When adding other reviewers, vote must be set to zero.
Reviewer *IdentityRefWithVote
- // (required) The repository ID of the pull request’s target branch.
+ // (required) The repository ID of the pull request's target branch.
RepositoryId *string
// (required) ID of the pull request.
PullRequestId *int
@@ -929,7 +933,7 @@ func (client *ClientImpl) CreatePullRequestReviewers(ctx context.Context, args C
return nil, marshalErr
}
locationId, _ := uuid.Parse("4b6702c7-aa35-4b89-9c96-b9abf6d3e540")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -943,7 +947,7 @@ func (client *ClientImpl) CreatePullRequestReviewers(ctx context.Context, args C
type CreatePullRequestReviewersArgs struct {
// (required) Reviewers to add to the pull request.
Reviewers *[]webapi.IdentityRef
- // (required) The repository ID of the pull request’s target branch.
+ // (required) The repository ID of the pull request's target branch.
RepositoryId *string
// (required) ID of the pull request.
PullRequestId *int
@@ -974,7 +978,7 @@ func (client *ClientImpl) CreatePullRequestStatus(ctx context.Context, args Crea
return nil, marshalErr
}
locationId, _ := uuid.Parse("b5f6bb4f-8d1e-4d79-8d11-4c9172c99c35")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1015,7 +1019,7 @@ func (client *ClientImpl) CreatePush(ctx context.Context, args CreatePushArgs) (
return nil, marshalErr
}
locationId, _ := uuid.Parse("ea98d07b-3c87-4971-8ede-a613694ffb55")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1054,7 +1058,7 @@ func (client *ClientImpl) CreateRepository(ctx context.Context, args CreateRepos
return nil, marshalErr
}
locationId, _ := uuid.Parse("225f7195-f9c7-4d14-ab28-a83f7ff77e1f")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1094,7 +1098,7 @@ func (client *ClientImpl) CreateRevert(ctx context.Context, args CreateRevertArg
return nil, marshalErr
}
locationId, _ := uuid.Parse("bc866058-5449-4715-9cf1-a510b6ff193c")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1137,7 +1141,7 @@ func (client *ClientImpl) CreateThread(ctx context.Context, args CreateThreadArg
return nil, marshalErr
}
locationId, _ := uuid.Parse("ab6e2e5d-a0b7-4153-b64a-a4efe0d49449")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1159,6 +1163,51 @@ type CreateThreadArgs struct {
Project *string
}
+// Add an unmaterialized identity to the reviewers of a pull request.
+func (client *ClientImpl) CreateUnmaterializedPullRequestReviewer(ctx context.Context, args CreateUnmaterializedPullRequestReviewerArgs) (*IdentityRefWithVote, error) {
+ if args.Reviewer == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.Reviewer"}
+ }
+ routeValues := make(map[string]string)
+ if args.Project != nil && *args.Project != "" {
+ routeValues["project"] = *args.Project
+ }
+ if args.RepositoryId == nil || *args.RepositoryId == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.RepositoryId"}
+ }
+ routeValues["repositoryId"] = *args.RepositoryId
+ if args.PullRequestId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.PullRequestId"}
+ }
+ routeValues["pullRequestId"] = strconv.Itoa(*args.PullRequestId)
+
+ body, marshalErr := json.Marshal(*args.Reviewer)
+ if marshalErr != nil {
+ return nil, marshalErr
+ }
+ locationId, _ := uuid.Parse("4b6702c7-aa35-4b89-9c96-b9abf6d3e540")
+ resp, err := client.Client.Send(ctx, http.MethodPut, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue IdentityRefWithVote
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the CreateUnmaterializedPullRequestReviewer function
+type CreateUnmaterializedPullRequestReviewerArgs struct {
+ // (required) Reviewer to add to the pull request.
+ Reviewer *IdentityRefWithVote
+ // (required) The repository ID of the pull request's target branch.
+ RepositoryId *string
+ // (required) ID of the pull request.
+ PullRequestId *int
+ // (optional) Project ID or project name
+ Project *string
+}
+
// [Preview API] Delete a pull request attachment.
func (client *ClientImpl) DeleteAttachment(ctx context.Context, args DeleteAttachmentArgs) error {
routeValues := make(map[string]string)
@@ -1179,7 +1228,7 @@ func (client *ClientImpl) DeleteAttachment(ctx context.Context, args DeleteAttac
routeValues["pullRequestId"] = strconv.Itoa(*args.PullRequestId)
locationId, _ := uuid.Parse("965d9361-878b-413b-a494-45d5b5fd8ab7")
- _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return err
}
@@ -1223,7 +1272,7 @@ func (client *ClientImpl) DeleteComment(ctx context.Context, args DeleteCommentA
routeValues["commentId"] = strconv.Itoa(*args.CommentId)
locationId, _ := uuid.Parse("965a3ec7-5ed8-455a-bdcb-835a5ea7fe7b")
- _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return err
}
@@ -1269,7 +1318,7 @@ func (client *ClientImpl) DeleteLike(ctx context.Context, args DeleteLikeArgs) e
routeValues["commentId"] = strconv.Itoa(*args.CommentId)
locationId, _ := uuid.Parse("5f2e2851-1389-425b-a00b-fb2adb3ef31b")
- _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return err
}
@@ -1315,7 +1364,7 @@ func (client *ClientImpl) DeletePullRequestIterationStatus(ctx context.Context,
routeValues["statusId"] = strconv.Itoa(*args.StatusId)
locationId, _ := uuid.Parse("75cf11c5-979f-4038-a76e-058a06adf2bf")
- _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return err
}
@@ -1361,7 +1410,7 @@ func (client *ClientImpl) DeletePullRequestLabels(ctx context.Context, args Dele
queryParams.Add("projectId", *args.ProjectId)
}
locationId, _ := uuid.Parse("f22387e3-984e-4c52-9c6d-fbb8f14c812d")
- _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return err
}
@@ -1403,7 +1452,7 @@ func (client *ClientImpl) DeletePullRequestReviewer(ctx context.Context, args De
routeValues["reviewerId"] = *args.ReviewerId
locationId, _ := uuid.Parse("4b6702c7-aa35-4b89-9c96-b9abf6d3e540")
- _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return err
}
@@ -1413,7 +1462,7 @@ func (client *ClientImpl) DeletePullRequestReviewer(ctx context.Context, args De
// Arguments for the DeletePullRequestReviewer function
type DeletePullRequestReviewerArgs struct {
- // (required) The repository ID of the pull request’s target branch.
+ // (required) The repository ID of the pull request's target branch.
RepositoryId *string
// (required) ID of the pull request.
PullRequestId *int
@@ -1443,7 +1492,7 @@ func (client *ClientImpl) DeletePullRequestStatus(ctx context.Context, args Dele
routeValues["statusId"] = strconv.Itoa(*args.StatusId)
locationId, _ := uuid.Parse("b5f6bb4f-8d1e-4d79-8d11-4c9172c99c35")
- _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return err
}
@@ -1476,7 +1525,7 @@ func (client *ClientImpl) DeleteRefFavorite(ctx context.Context, args DeleteRefF
routeValues["favoriteId"] = strconv.Itoa(*args.FavoriteId)
locationId, _ := uuid.Parse("876f70af-5792-485a-a1c7-d0a7b2f42bbb")
- _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return err
}
@@ -1504,7 +1553,7 @@ func (client *ClientImpl) DeleteRepository(ctx context.Context, args DeleteRepos
routeValues["repositoryId"] = (*args.RepositoryId).String()
locationId, _ := uuid.Parse("225f7195-f9c7-4d14-ab28-a83f7ff77e1f")
- _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return err
}
@@ -1514,7 +1563,7 @@ func (client *ClientImpl) DeleteRepository(ctx context.Context, args DeleteRepos
// Arguments for the DeleteRepository function
type DeleteRepositoryArgs struct {
- // (required) The name or ID of the repository.
+ // (required) The ID of the repository.
RepositoryId *uuid.UUID
// (optional) Project ID or project name
Project *string
@@ -1533,7 +1582,7 @@ func (client *ClientImpl) DeleteRepositoryFromRecycleBin(ctx context.Context, ar
routeValues["repositoryId"] = (*args.RepositoryId).String()
locationId, _ := uuid.Parse("a663da97-81db-4eb3-8b83-287670f63073")
- _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return err
}
@@ -1566,7 +1615,7 @@ func (client *ClientImpl) GetAnnotatedTag(ctx context.Context, args GetAnnotated
routeValues["objectId"] = *args.ObjectId
locationId, _ := uuid.Parse("5e8a8081-3851-4626-b677-9891cc04102e")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1606,7 +1655,7 @@ func (client *ClientImpl) GetAttachmentContent(ctx context.Context, args GetAtta
routeValues["pullRequestId"] = strconv.Itoa(*args.PullRequestId)
locationId, _ := uuid.Parse("965d9361-878b-413b-a494-45d5b5fd8ab7")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/octet-stream", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/octet-stream", nil)
if err != nil {
return nil, err
}
@@ -1642,7 +1691,7 @@ func (client *ClientImpl) GetAttachments(ctx context.Context, args GetAttachment
routeValues["pullRequestId"] = strconv.Itoa(*args.PullRequestId)
locationId, _ := uuid.Parse("965d9361-878b-413b-a494-45d5b5fd8ab7")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1682,7 +1731,7 @@ func (client *ClientImpl) GetAttachmentZip(ctx context.Context, args GetAttachme
routeValues["pullRequestId"] = strconv.Itoa(*args.PullRequestId)
locationId, _ := uuid.Parse("965d9361-878b-413b-a494-45d5b5fd8ab7")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/zip", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/zip", nil)
if err != nil {
return nil, err
}
@@ -1728,7 +1777,7 @@ func (client *ClientImpl) GetBlob(ctx context.Context, args GetBlobArgs) (*GitBl
queryParams.Add("resolveLfs", strconv.FormatBool(*args.ResolveLfs))
}
locationId, _ := uuid.Parse("7b28e929-2c99-405d-9c5c-6167a06e6816")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1780,7 +1829,7 @@ func (client *ClientImpl) GetBlobContent(ctx context.Context, args GetBlobConten
queryParams.Add("resolveLfs", strconv.FormatBool(*args.ResolveLfs))
}
locationId, _ := uuid.Parse("7b28e929-2c99-405d-9c5c-6167a06e6816")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/octet-stream", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/octet-stream", nil)
if err != nil {
return nil, err
}
@@ -1827,7 +1876,7 @@ func (client *ClientImpl) GetBlobsZip(ctx context.Context, args GetBlobsZipArgs)
return nil, marshalErr
}
locationId, _ := uuid.Parse("7b28e929-2c99-405d-9c5c-6167a06e6816")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/zip", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/zip", nil)
if err != nil {
return nil, err
}
@@ -1873,7 +1922,7 @@ func (client *ClientImpl) GetBlobZip(ctx context.Context, args GetBlobZipArgs) (
queryParams.Add("resolveLfs", strconv.FormatBool(*args.ResolveLfs))
}
locationId, _ := uuid.Parse("7b28e929-2c99-405d-9c5c-6167a06e6816")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/zip", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/zip", nil)
if err != nil {
return nil, err
}
@@ -1925,7 +1974,7 @@ func (client *ClientImpl) GetBranch(ctx context.Context, args GetBranchArgs) (*G
}
}
locationId, _ := uuid.Parse("d5b216de-d8d5-4d32-ae76-51df755b16d3")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1971,7 +2020,7 @@ func (client *ClientImpl) GetBranches(ctx context.Context, args GetBranchesArgs)
}
}
locationId, _ := uuid.Parse("d5b216de-d8d5-4d32-ae76-51df755b16d3")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2014,7 +2063,7 @@ func (client *ClientImpl) GetChanges(ctx context.Context, args GetChangesArgs) (
queryParams.Add("skip", strconv.Itoa(*args.Skip))
}
locationId, _ := uuid.Parse("5bf884f5-3e07-42e9-afb8-1b872267bf16")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2038,7 +2087,7 @@ type GetChangesArgs struct {
Skip *int
}
-// [Preview API] Retrieve information about a cherry pick by cherry pick Id.
+// [Preview API] Retrieve information about a cherry pick operation by cherry pick Id.
func (client *ClientImpl) GetCherryPick(ctx context.Context, args GetCherryPickArgs) (*GitCherryPick, error) {
routeValues := make(map[string]string)
if args.Project == nil || *args.Project == "" {
@@ -2055,7 +2104,7 @@ func (client *ClientImpl) GetCherryPick(ctx context.Context, args GetCherryPickA
routeValues["repositoryId"] = *args.RepositoryId
locationId, _ := uuid.Parse("033bad68-9a14-43d1-90e0-59cb8856fef6")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2075,7 +2124,7 @@ type GetCherryPickArgs struct {
RepositoryId *string
}
-// [Preview API] Retrieve information about a cherry pick for a specific branch.
+// [Preview API] Retrieve information about a cherry pick operation for a specific branch. This operation is expensive due to the underlying object structure, so this API only looks at the 1000 most recent cherry pick operations.
func (client *ClientImpl) GetCherryPickForRefName(ctx context.Context, args GetCherryPickForRefNameArgs) (*GitCherryPick, error) {
routeValues := make(map[string]string)
if args.Project == nil || *args.Project == "" {
@@ -2093,7 +2142,7 @@ func (client *ClientImpl) GetCherryPickForRefName(ctx context.Context, args GetC
}
queryParams.Add("refName", *args.RefName)
locationId, _ := uuid.Parse("033bad68-9a14-43d1-90e0-59cb8856fef6")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2137,7 +2186,7 @@ func (client *ClientImpl) GetComment(ctx context.Context, args GetCommentArgs) (
routeValues["commentId"] = strconv.Itoa(*args.CommentId)
locationId, _ := uuid.Parse("965a3ec7-5ed8-455a-bdcb-835a5ea7fe7b")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2181,7 +2230,7 @@ func (client *ClientImpl) GetComments(ctx context.Context, args GetCommentsArgs)
routeValues["threadId"] = strconv.Itoa(*args.ThreadId)
locationId, _ := uuid.Parse("965a3ec7-5ed8-455a-bdcb-835a5ea7fe7b")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2223,7 +2272,7 @@ func (client *ClientImpl) GetCommit(ctx context.Context, args GetCommitArgs) (*G
queryParams.Add("changeCount", strconv.Itoa(*args.ChangeCount))
}
locationId, _ := uuid.Parse("c2570c3b-5b3f-41b8-98bf-5407bfde8d58")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2289,7 +2338,7 @@ func (client *ClientImpl) GetCommitDiffs(ctx context.Context, args GetCommitDiff
}
}
locationId, _ := uuid.Parse("615588d5-c0c7-4b88-88f8-e625306446e8")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2404,6 +2453,9 @@ func (client *ClientImpl) GetCommits(ctx context.Context, args GetCommitsArgs) (
if args.SearchCriteria.HistoryMode != nil {
queryParams.Add("searchCriteria.historyMode", string(*args.SearchCriteria.HistoryMode))
}
+ if args.SearchCriteria.ShowOldestCommitsFirst != nil {
+ queryParams.Add("searchCriteria.showOldestCommitsFirst", strconv.FormatBool(*args.SearchCriteria.ShowOldestCommitsFirst))
+ }
if args.Skip != nil {
queryParams.Add("$skip", strconv.Itoa(*args.Skip))
}
@@ -2411,7 +2463,7 @@ func (client *ClientImpl) GetCommits(ctx context.Context, args GetCommitsArgs) (
queryParams.Add("$top", strconv.Itoa(*args.Top))
}
locationId, _ := uuid.Parse("c2570c3b-5b3f-41b8-98bf-5407bfde8d58")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2464,7 +2516,7 @@ func (client *ClientImpl) GetCommitsBatch(ctx context.Context, args GetCommitsBa
return nil, marshalErr
}
locationId, _ := uuid.Parse("6400dfb2-0bcb-462b-b992-5a57f8f1416c")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2499,7 +2551,7 @@ func (client *ClientImpl) GetDeletedRepositories(ctx context.Context, args GetDe
routeValues["project"] = *args.Project
locationId, _ := uuid.Parse("2b6869c4-cb25-42b5-b7a3-0d3e6be0a11a")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2535,7 +2587,7 @@ func (client *ClientImpl) GetForks(ctx context.Context, args GetForksArgs) (*[]G
queryParams.Add("includeLinks", strconv.FormatBool(*args.IncludeLinks))
}
locationId, _ := uuid.Parse("158c0340-bf6f-489c-9625-d572a1480d57")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2577,7 +2629,7 @@ func (client *ClientImpl) GetForkSyncRequest(ctx context.Context, args GetForkSy
queryParams.Add("includeLinks", strconv.FormatBool(*args.IncludeLinks))
}
locationId, _ := uuid.Parse("1703f858-b9d1-46af-ab62-483e9e1055b5")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2618,7 +2670,7 @@ func (client *ClientImpl) GetForkSyncRequests(ctx context.Context, args GetForkS
queryParams.Add("includeLinks", strconv.FormatBool(*args.IncludeLinks))
}
locationId, _ := uuid.Parse("1703f858-b9d1-46af-ab62-483e9e1055b5")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2657,7 +2709,7 @@ func (client *ClientImpl) GetImportRequest(ctx context.Context, args GetImportRe
routeValues["importRequestId"] = strconv.Itoa(*args.ImportRequestId)
locationId, _ := uuid.Parse("01828ddc-3600-4a41-8633-99b3a73a0eb3")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2725,8 +2777,11 @@ func (client *ClientImpl) GetItem(ctx context.Context, args GetItemArgs) (*GitIt
if args.ResolveLfs != nil {
queryParams.Add("resolveLfs", strconv.FormatBool(*args.ResolveLfs))
}
+ if args.Sanitize != nil {
+ queryParams.Add("sanitize", strconv.FormatBool(*args.Sanitize))
+ }
locationId, _ := uuid.Parse("fb93c0db-47ed-4a31-8c20-47552878fb44")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2760,6 +2815,8 @@ type GetItemArgs struct {
IncludeContent *bool
// (optional) Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false.
ResolveLfs *bool
+ // (optional) Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false.
+ Sanitize *bool
}
// Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download.
@@ -2810,8 +2867,11 @@ func (client *ClientImpl) GetItemContent(ctx context.Context, args GetItemConten
if args.ResolveLfs != nil {
queryParams.Add("resolveLfs", strconv.FormatBool(*args.ResolveLfs))
}
+ if args.Sanitize != nil {
+ queryParams.Add("sanitize", strconv.FormatBool(*args.Sanitize))
+ }
locationId, _ := uuid.Parse("fb93c0db-47ed-4a31-8c20-47552878fb44")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/octet-stream", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/octet-stream", nil)
if err != nil {
return nil, err
}
@@ -2843,6 +2903,8 @@ type GetItemContentArgs struct {
IncludeContent *bool
// (optional) Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false.
ResolveLfs *bool
+ // (optional) Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false.
+ Sanitize *bool
}
// Get Item Metadata and/or Content for a collection of items. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download.
@@ -2887,7 +2949,7 @@ func (client *ClientImpl) GetItems(ctx context.Context, args GetItemsArgs) (*[]G
}
}
locationId, _ := uuid.Parse("fb93c0db-47ed-4a31-8c20-47552878fb44")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2938,7 +3000,7 @@ func (client *ClientImpl) GetItemsBatch(ctx context.Context, args GetItemsBatchA
return nil, marshalErr
}
locationId, _ := uuid.Parse("630fd2e4-fb88-4f85-ad21-13f3fd1fbca9")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -3006,8 +3068,11 @@ func (client *ClientImpl) GetItemText(ctx context.Context, args GetItemTextArgs)
if args.ResolveLfs != nil {
queryParams.Add("resolveLfs", strconv.FormatBool(*args.ResolveLfs))
}
+ if args.Sanitize != nil {
+ queryParams.Add("sanitize", strconv.FormatBool(*args.Sanitize))
+ }
locationId, _ := uuid.Parse("fb93c0db-47ed-4a31-8c20-47552878fb44")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "text/plain", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "text/plain", nil)
if err != nil {
return nil, err
}
@@ -3039,6 +3104,8 @@ type GetItemTextArgs struct {
IncludeContent *bool
// (optional) Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false.
ResolveLfs *bool
+ // (optional) Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false.
+ Sanitize *bool
}
// Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download.
@@ -3089,8 +3156,11 @@ func (client *ClientImpl) GetItemZip(ctx context.Context, args GetItemZipArgs) (
if args.ResolveLfs != nil {
queryParams.Add("resolveLfs", strconv.FormatBool(*args.ResolveLfs))
}
+ if args.Sanitize != nil {
+ queryParams.Add("sanitize", strconv.FormatBool(*args.Sanitize))
+ }
locationId, _ := uuid.Parse("fb93c0db-47ed-4a31-8c20-47552878fb44")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/zip", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/zip", nil)
if err != nil {
return nil, err
}
@@ -3122,6 +3192,8 @@ type GetItemZipArgs struct {
IncludeContent *bool
// (optional) Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false.
ResolveLfs *bool
+ // (optional) Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false.
+ Sanitize *bool
}
// [Preview API] Get likes for a comment.
@@ -3148,7 +3220,7 @@ func (client *ClientImpl) GetLikes(ctx context.Context, args GetLikesArgs) (*[]w
routeValues["commentId"] = strconv.Itoa(*args.CommentId)
locationId, _ := uuid.Parse("5f2e2851-1389-425b-a00b-fb2adb3ef31b")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -3199,7 +3271,7 @@ func (client *ClientImpl) GetMergeBases(ctx context.Context, args GetMergeBasesA
queryParams.Add("otherRepositoryId", (*args.OtherRepositoryId).String())
}
locationId, _ := uuid.Parse("7cf2abb6-c964-4f7e-9872-f78c66e72e9c")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -3246,7 +3318,7 @@ func (client *ClientImpl) GetMergeRequest(ctx context.Context, args GetMergeRequ
queryParams.Add("includeLinks", strconv.FormatBool(*args.IncludeLinks))
}
locationId, _ := uuid.Parse("985f7ae9-844f-4906-9897-7ef41516c0e2")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -3293,7 +3365,7 @@ func (client *ClientImpl) GetPolicyConfigurations(ctx context.Context, args GetP
queryParams.Add("continuationToken", *args.ContinuationToken)
}
locationId, _ := uuid.Parse("2c420070-a0a2-49cc-9639-c9f271c5ff07")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -3361,7 +3433,7 @@ func (client *ClientImpl) GetPullRequest(ctx context.Context, args GetPullReques
queryParams.Add("includeWorkItemRefs", strconv.FormatBool(*args.IncludeWorkItemRefs))
}
locationId, _ := uuid.Parse("9946fd70-0d40-406e-b686-b4744cbbcc37")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -3403,7 +3475,7 @@ func (client *ClientImpl) GetPullRequestById(ctx context.Context, args GetPullRe
routeValues["pullRequestId"] = strconv.Itoa(*args.PullRequestId)
locationId, _ := uuid.Parse("01a46dea-7d46-4d40-bc84-319e7c260d99")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -3436,15 +3508,8 @@ func (client *ClientImpl) GetPullRequestCommits(ctx context.Context, args GetPul
}
routeValues["pullRequestId"] = strconv.Itoa(*args.PullRequestId)
- queryParams := url.Values{}
- if args.Top != nil {
- queryParams.Add("$top", strconv.Itoa(*args.Top))
- }
- if args.ContinuationToken != nil {
- queryParams.Add("continuationToken", *args.ContinuationToken)
- }
locationId, _ := uuid.Parse("52823034-34a8-4576-922c-8d8b77e9e4c4")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -3463,16 +3528,11 @@ type GetPullRequestCommitsArgs struct {
PullRequestId *int
// (optional) Project ID or project name
Project *string
- // (optional) Maximum number of commits to return.
- Top *int
- // (optional) The continuation token used for pagination.
- ContinuationToken *string
}
// Return type for the GetPullRequestCommits function
type GetPullRequestCommitsResponseValue struct {
- Value []GitCommitRef
- // The continuation token to be used to get the next page of results.
+ Value []GitCommitRef
ContinuationToken string
}
@@ -3496,7 +3556,7 @@ func (client *ClientImpl) GetPullRequestIteration(ctx context.Context, args GetP
routeValues["iterationId"] = strconv.Itoa(*args.IterationId)
locationId, _ := uuid.Parse("d43911ee-6958-46b0-a42b-8445b8a0d004")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -3548,7 +3608,7 @@ func (client *ClientImpl) GetPullRequestIterationChanges(ctx context.Context, ar
queryParams.Add("$compareTo", strconv.Itoa(*args.CompareTo))
}
locationId, _ := uuid.Parse("4216bdcf-b6b1-4d59-8b82-c34cc183fc8b")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -3603,7 +3663,7 @@ func (client *ClientImpl) GetPullRequestIterationCommits(ctx context.Context, ar
queryParams.Add("skip", strconv.Itoa(*args.Skip))
}
locationId, _ := uuid.Parse("e7ea0883-095f-4926-b5fb-f24691c26fb9")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -3649,7 +3709,7 @@ func (client *ClientImpl) GetPullRequestIterations(ctx context.Context, args Get
queryParams.Add("includeCommits", strconv.FormatBool(*args.IncludeCommits))
}
locationId, _ := uuid.Parse("d43911ee-6958-46b0-a42b-8445b8a0d004")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -3695,7 +3755,7 @@ func (client *ClientImpl) GetPullRequestIterationStatus(ctx context.Context, arg
routeValues["statusId"] = strconv.Itoa(*args.StatusId)
locationId, _ := uuid.Parse("75cf11c5-979f-4038-a76e-058a06adf2bf")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -3739,7 +3799,7 @@ func (client *ClientImpl) GetPullRequestIterationStatuses(ctx context.Context, a
routeValues["iterationId"] = strconv.Itoa(*args.IterationId)
locationId, _ := uuid.Parse("75cf11c5-979f-4038-a76e-058a06adf2bf")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -3785,7 +3845,7 @@ func (client *ClientImpl) GetPullRequestLabel(ctx context.Context, args GetPullR
queryParams.Add("projectId", *args.ProjectId)
}
locationId, _ := uuid.Parse("f22387e3-984e-4c52-9c6d-fbb8f14c812d")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -3829,7 +3889,7 @@ func (client *ClientImpl) GetPullRequestLabels(ctx context.Context, args GetPull
queryParams.Add("projectId", *args.ProjectId)
}
locationId, _ := uuid.Parse("f22387e3-984e-4c52-9c6d-fbb8f14c812d")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -3867,7 +3927,7 @@ func (client *ClientImpl) GetPullRequestProperties(ctx context.Context, args Get
routeValues["pullRequestId"] = strconv.Itoa(*args.PullRequestId)
locationId, _ := uuid.Parse("48a52185-5b9e-4736-9dc1-bb1e2feac80b")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -3906,7 +3966,7 @@ func (client *ClientImpl) GetPullRequestQuery(ctx context.Context, args GetPullR
return nil, marshalErr
}
locationId, _ := uuid.Parse("b3a6eebe-9cf0-49ea-b6cb-1a4c5f5007b0")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -3946,7 +4006,7 @@ func (client *ClientImpl) GetPullRequestReviewer(ctx context.Context, args GetPu
routeValues["reviewerId"] = *args.ReviewerId
locationId, _ := uuid.Parse("4b6702c7-aa35-4b89-9c96-b9abf6d3e540")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -3958,7 +4018,7 @@ func (client *ClientImpl) GetPullRequestReviewer(ctx context.Context, args GetPu
// Arguments for the GetPullRequestReviewer function
type GetPullRequestReviewerArgs struct {
- // (required) The repository ID of the pull request’s target branch.
+ // (required) The repository ID of the pull request's target branch.
RepositoryId *string
// (required) ID of the pull request.
PullRequestId *int
@@ -3984,7 +4044,7 @@ func (client *ClientImpl) GetPullRequestReviewers(ctx context.Context, args GetP
routeValues["pullRequestId"] = strconv.Itoa(*args.PullRequestId)
locationId, _ := uuid.Parse("4b6702c7-aa35-4b89-9c96-b9abf6d3e540")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -3996,7 +4056,7 @@ func (client *ClientImpl) GetPullRequestReviewers(ctx context.Context, args GetP
// Arguments for the GetPullRequestReviewers function
type GetPullRequestReviewersArgs struct {
- // (required) The repository ID of the pull request’s target branch.
+ // (required) The repository ID of the pull request's target branch.
RepositoryId *string
// (required) ID of the pull request.
PullRequestId *int
@@ -4053,7 +4113,7 @@ func (client *ClientImpl) GetPullRequests(ctx context.Context, args GetPullReque
queryParams.Add("$top", strconv.Itoa(*args.Top))
}
locationId, _ := uuid.Parse("9946fd70-0d40-406e-b686-b4744cbbcc37")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -4125,7 +4185,7 @@ func (client *ClientImpl) GetPullRequestsByProject(ctx context.Context, args Get
queryParams.Add("$top", strconv.Itoa(*args.Top))
}
locationId, _ := uuid.Parse("a5d28130-9cd2-40fa-9f08-902e7daa9efb")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -4169,7 +4229,7 @@ func (client *ClientImpl) GetPullRequestStatus(ctx context.Context, args GetPull
routeValues["statusId"] = strconv.Itoa(*args.StatusId)
locationId, _ := uuid.Parse("b5f6bb4f-8d1e-4d79-8d11-4c9172c99c35")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -4207,7 +4267,7 @@ func (client *ClientImpl) GetPullRequestStatuses(ctx context.Context, args GetPu
routeValues["pullRequestId"] = strconv.Itoa(*args.PullRequestId)
locationId, _ := uuid.Parse("b5f6bb4f-8d1e-4d79-8d11-4c9172c99c35")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -4254,7 +4314,7 @@ func (client *ClientImpl) GetPullRequestThread(ctx context.Context, args GetPull
queryParams.Add("$baseIteration", strconv.Itoa(*args.BaseIteration))
}
locationId, _ := uuid.Parse("ab6e2e5d-a0b7-4153-b64a-a4efe0d49449")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -4296,7 +4356,7 @@ func (client *ClientImpl) GetPullRequestWorkItemRefs(ctx context.Context, args G
routeValues["pullRequestId"] = strconv.Itoa(*args.PullRequestId)
locationId, _ := uuid.Parse("0a637fcc-5370-4ce8-b0e8-98091f5f9482")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -4339,7 +4399,7 @@ func (client *ClientImpl) GetPush(ctx context.Context, args GetPushArgs) (*GitPu
queryParams.Add("includeRefUpdates", strconv.FormatBool(*args.IncludeRefUpdates))
}
locationId, _ := uuid.Parse("ea98d07b-3c87-4971-8ede-a613694ffb55")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -4389,7 +4449,7 @@ func (client *ClientImpl) GetPushCommits(ctx context.Context, args GetPushCommit
queryParams.Add("includeLinks", strconv.FormatBool(*args.IncludeLinks))
}
locationId, _ := uuid.Parse("c2570c3b-5b3f-41b8-98bf-5407bfde8d58")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -4454,7 +4514,7 @@ func (client *ClientImpl) GetPushes(ctx context.Context, args GetPushesArgs) (*[
}
}
locationId, _ := uuid.Parse("ea98d07b-3c87-4971-8ede-a613694ffb55")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -4487,7 +4547,7 @@ func (client *ClientImpl) GetRecycleBinRepositories(ctx context.Context, args Ge
routeValues["project"] = *args.Project
locationId, _ := uuid.Parse("a663da97-81db-4eb3-8b83-287670f63073")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -4516,7 +4576,7 @@ func (client *ClientImpl) GetRefFavorite(ctx context.Context, args GetRefFavorit
routeValues["favoriteId"] = strconv.Itoa(*args.FavoriteId)
locationId, _ := uuid.Parse("876f70af-5792-485a-a1c7-d0a7b2f42bbb")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -4550,7 +4610,7 @@ func (client *ClientImpl) GetRefFavorites(ctx context.Context, args GetRefFavori
queryParams.Add("identityId", *args.IdentityId)
}
locationId, _ := uuid.Parse("876f70af-5792-485a-a1c7-d0a7b2f42bbb")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -4610,7 +4670,7 @@ func (client *ClientImpl) GetRefs(ctx context.Context, args GetRefsArgs) (*GetRe
queryParams.Add("continuationToken", *args.ContinuationToken)
}
locationId, _ := uuid.Parse("2d874a60-a811-4f62-9c9f-963a6ea0a55b")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -4649,8 +4709,7 @@ type GetRefsArgs struct {
// Return type for the GetRefs function
type GetRefsResponseValue struct {
- Value []GitRef
- // The continuation token to be used to get the next page of results.
+ Value []GitRef
ContinuationToken string
}
@@ -4672,7 +4731,7 @@ func (client *ClientImpl) GetRepositories(ctx context.Context, args GetRepositor
queryParams.Add("includeHidden", strconv.FormatBool(*args.IncludeHidden))
}
locationId, _ := uuid.Parse("225f7195-f9c7-4d14-ab28-a83f7ff77e1f")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -4706,7 +4765,7 @@ func (client *ClientImpl) GetRepository(ctx context.Context, args GetRepositoryA
routeValues["repositoryId"] = *args.RepositoryId
locationId, _ := uuid.Parse("225f7195-f9c7-4d14-ab28-a83f7ff77e1f")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -4741,7 +4800,7 @@ func (client *ClientImpl) GetRepositoryWithParent(ctx context.Context, args GetR
}
queryParams.Add("includeParent", strconv.FormatBool(*args.IncludeParent))
locationId, _ := uuid.Parse("225f7195-f9c7-4d14-ab28-a83f7ff77e1f")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -4778,7 +4837,7 @@ func (client *ClientImpl) GetRevert(ctx context.Context, args GetRevertArgs) (*G
routeValues["repositoryId"] = *args.RepositoryId
locationId, _ := uuid.Parse("bc866058-5449-4715-9cf1-a510b6ff193c")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -4816,7 +4875,7 @@ func (client *ClientImpl) GetRevertForRefName(ctx context.Context, args GetRever
}
queryParams.Add("refName", *args.RefName)
locationId, _ := uuid.Parse("bc866058-5449-4715-9cf1-a510b6ff193c")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -4862,7 +4921,7 @@ func (client *ClientImpl) GetStatuses(ctx context.Context, args GetStatusesArgs)
queryParams.Add("latestOnly", strconv.FormatBool(*args.LatestOnly))
}
locationId, _ := uuid.Parse("428dd4fb-fda5-4722-af02-9313b80305da")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -4900,7 +4959,7 @@ func (client *ClientImpl) GetSuggestions(ctx context.Context, args GetSuggestion
routeValues["repositoryId"] = *args.RepositoryId
locationId, _ := uuid.Parse("9393b4fb-4445-4919-972b-9ad16f442d83")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -4941,7 +5000,7 @@ func (client *ClientImpl) GetThreads(ctx context.Context, args GetThreadsArgs) (
queryParams.Add("$baseIteration", strconv.Itoa(*args.BaseIteration))
}
locationId, _ := uuid.Parse("ab6e2e5d-a0b7-4153-b64a-a4efe0d49449")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -4991,7 +5050,7 @@ func (client *ClientImpl) GetTree(ctx context.Context, args GetTreeArgs) (*GitTr
queryParams.Add("fileName", *args.FileName)
}
locationId, _ := uuid.Parse("729f6437-6f92-44ec-8bee-273a7111063c")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -5043,7 +5102,7 @@ func (client *ClientImpl) GetTreeZip(ctx context.Context, args GetTreeZipArgs) (
queryParams.Add("fileName", *args.FileName)
}
locationId, _ := uuid.Parse("729f6437-6f92-44ec-8bee-273a7111063c")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/zip", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/zip", nil)
if err != nil {
return nil, err
}
@@ -5084,7 +5143,7 @@ func (client *ClientImpl) QueryImportRequests(ctx context.Context, args QueryImp
queryParams.Add("includeAbandoned", strconv.FormatBool(*args.IncludeAbandoned))
}
locationId, _ := uuid.Parse("01828ddc-3600-4a41-8633-99b3a73a0eb3")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -5124,7 +5183,7 @@ func (client *ClientImpl) RestoreRepositoryFromRecycleBin(ctx context.Context, a
return nil, marshalErr
}
locationId, _ := uuid.Parse("a663da97-81db-4eb3-8b83-287670f63073")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -5167,7 +5226,7 @@ func (client *ClientImpl) SharePullRequest(ctx context.Context, args SharePullRe
return marshalErr
}
locationId, _ := uuid.Parse("696f3a82-47c9-487f-9117-b9d00972ca84")
- _, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return err
}
@@ -5218,7 +5277,7 @@ func (client *ClientImpl) UpdateComment(ctx context.Context, args UpdateCommentA
return nil, marshalErr
}
locationId, _ := uuid.Parse("965a3ec7-5ed8-455a-bdcb-835a5ea7fe7b")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -5268,7 +5327,7 @@ func (client *ClientImpl) UpdateImportRequest(ctx context.Context, args UpdateIm
return nil, marshalErr
}
locationId, _ := uuid.Parse("01828ddc-3600-4a41-8633-99b3a73a0eb3")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -5313,7 +5372,7 @@ func (client *ClientImpl) UpdatePullRequest(ctx context.Context, args UpdatePull
return nil, marshalErr
}
locationId, _ := uuid.Parse("9946fd70-0d40-406e-b686-b4744cbbcc37")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -5362,7 +5421,7 @@ func (client *ClientImpl) UpdatePullRequestIterationStatuses(ctx context.Context
return marshalErr
}
locationId, _ := uuid.Parse("75cf11c5-979f-4038-a76e-058a06adf2bf")
- _, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1-preview.1", routeValues, nil, bytes.NewReader(body), "application/json-patch+json", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json-patch+json", "application/json", nil)
if err != nil {
return err
}
@@ -5407,7 +5466,7 @@ func (client *ClientImpl) UpdatePullRequestProperties(ctx context.Context, args
return nil, marshalErr
}
locationId, _ := uuid.Parse("48a52185-5b9e-4736-9dc1-bb1e2feac80b")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1-preview.1", routeValues, nil, bytes.NewReader(body), "application/json-patch+json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json-patch+json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -5429,6 +5488,57 @@ type UpdatePullRequestPropertiesArgs struct {
Project *string
}
+// Edit a reviewer entry. These fields are patchable: isFlagged, hasDeclined
+func (client *ClientImpl) UpdatePullRequestReviewer(ctx context.Context, args UpdatePullRequestReviewerArgs) (*IdentityRefWithVote, error) {
+ if args.Reviewer == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.Reviewer"}
+ }
+ routeValues := make(map[string]string)
+ if args.Project != nil && *args.Project != "" {
+ routeValues["project"] = *args.Project
+ }
+ if args.RepositoryId == nil || *args.RepositoryId == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.RepositoryId"}
+ }
+ routeValues["repositoryId"] = *args.RepositoryId
+ if args.PullRequestId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.PullRequestId"}
+ }
+ routeValues["pullRequestId"] = strconv.Itoa(*args.PullRequestId)
+ if args.ReviewerId == nil || *args.ReviewerId == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.ReviewerId"}
+ }
+ routeValues["reviewerId"] = *args.ReviewerId
+
+ body, marshalErr := json.Marshal(*args.Reviewer)
+ if marshalErr != nil {
+ return nil, marshalErr
+ }
+ locationId, _ := uuid.Parse("4b6702c7-aa35-4b89-9c96-b9abf6d3e540")
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue IdentityRefWithVote
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the UpdatePullRequestReviewer function
+type UpdatePullRequestReviewerArgs struct {
+ // (required) Reviewer data.
If the reviewer's ID is included here, it must match the reviewerID parameter.
+ Reviewer *IdentityRefWithVote
+ // (required) The repository ID of the pull request's target branch.
+ RepositoryId *string
+ // (required) ID of the pull request.
+ PullRequestId *int
+ // (required) ID of the reviewer.
+ ReviewerId *string
+ // (optional) Project ID or project name
+ Project *string
+}
+
// Reset the votes of multiple reviewers on a pull request. NOTE: This endpoint only supports updating votes, but does not support updating required reviewers (use policy) or display names.
func (client *ClientImpl) UpdatePullRequestReviewers(ctx context.Context, args UpdatePullRequestReviewersArgs) error {
if args.PatchVotes == nil {
@@ -5452,7 +5562,7 @@ func (client *ClientImpl) UpdatePullRequestReviewers(ctx context.Context, args U
return marshalErr
}
locationId, _ := uuid.Parse("4b6702c7-aa35-4b89-9c96-b9abf6d3e540")
- _, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return err
}
@@ -5464,7 +5574,7 @@ func (client *ClientImpl) UpdatePullRequestReviewers(ctx context.Context, args U
type UpdatePullRequestReviewersArgs struct {
// (required) IDs of the reviewers whose votes will be reset to zero
PatchVotes *[]IdentityRefWithVote
- // (required) The repository ID of the pull request’s target branch.
+ // (required) The repository ID of the pull request's target branch.
RepositoryId *string
// (required) ID of the pull request
PullRequestId *int
@@ -5495,7 +5605,7 @@ func (client *ClientImpl) UpdatePullRequestStatuses(ctx context.Context, args Up
return marshalErr
}
locationId, _ := uuid.Parse("b5f6bb4f-8d1e-4d79-8d11-4c9172c99c35")
- _, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1-preview.1", routeValues, nil, bytes.NewReader(body), "application/json-patch+json", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json-patch+json", "application/json", nil)
if err != nil {
return err
}
@@ -5542,7 +5652,7 @@ func (client *ClientImpl) UpdateRef(ctx context.Context, args UpdateRefArgs) (*G
return nil, marshalErr
}
locationId, _ := uuid.Parse("2d874a60-a811-4f62-9c9f-963a6ea0a55b")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -5589,7 +5699,7 @@ func (client *ClientImpl) UpdateRefs(ctx context.Context, args UpdateRefsArgs) (
return nil, marshalErr
}
locationId, _ := uuid.Parse("2d874a60-a811-4f62-9c9f-963a6ea0a55b")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -5630,7 +5740,7 @@ func (client *ClientImpl) UpdateRepository(ctx context.Context, args UpdateRepos
return nil, marshalErr
}
locationId, _ := uuid.Parse("225f7195-f9c7-4d14-ab28-a83f7ff77e1f")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -5644,7 +5754,7 @@ func (client *ClientImpl) UpdateRepository(ctx context.Context, args UpdateRepos
type UpdateRepositoryArgs struct {
// (required) Specify a new repo name or a new default branch of the repository
NewRepositoryInfo *GitRepository
- // (required) The name or ID of the repository.
+ // (required) The ID of the repository.
RepositoryId *uuid.UUID
// (optional) Project ID or project name
Project *string
@@ -5677,7 +5787,7 @@ func (client *ClientImpl) UpdateThread(ctx context.Context, args UpdateThreadArg
return nil, marshalErr
}
locationId, _ := uuid.Parse("ab6e2e5d-a0b7-4153-b64a-a4efe0d49449")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/git/models.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/git/models.go
similarity index 94%
rename from vendor/github.com/microsoft/azure-devops-go-api/azuredevops/git/models.go
rename to vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/git/models.go
index 3ba3b552a..7b440d2fc 100644
--- a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/git/models.go
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/git/models.go
@@ -10,10 +10,10 @@ package git
import (
"github.com/google/uuid"
- "github.com/microsoft/azure-devops-go-api/azuredevops"
- "github.com/microsoft/azure-devops-go-api/azuredevops/core"
- "github.com/microsoft/azure-devops-go-api/azuredevops/policy"
- "github.com/microsoft/azure-devops-go-api/azuredevops/webapi"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/core"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/policy"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/webapi"
)
type AssociatedWorkItem struct {
@@ -1288,7 +1288,9 @@ type GitMergeOperationStatusDetail struct {
}
type GitMergeOriginRef struct {
+ CherryPickId *int `json:"cherryPickId,omitempty"`
PullRequestId *int `json:"pullRequestId,omitempty"`
+ RevertId *int `json:"revertId,omitempty"`
}
// Parameters required for performing git merge.
@@ -1499,6 +1501,8 @@ type GitPullRequestCommentThreadContext struct {
// Preferences about how the pull request should be completed.
type GitPullRequestCompletionOptions struct {
+ // List of any policy configuration Id's which auto-complete should not wait for. Only applies to optional policies (isBlocking == false). Auto-complete always waits for required policies (isBlocking == true).
+ AutoCompleteIgnoreConfigIds *[]int `json:"autoCompleteIgnoreConfigIds,omitempty"`
// If true, policies will be explicitly bypassed while the pull request is completed.
BypassPolicy *bool `json:"bypassPolicy,omitempty"`
// If policies are bypassed, this reason is stored as to why bypass was used.
@@ -1507,7 +1511,7 @@ type GitPullRequestCompletionOptions struct {
DeleteSourceBranch *bool `json:"deleteSourceBranch,omitempty"`
// If set, this will be used as the commit message of the merge commit.
MergeCommitMessage *string `json:"mergeCommitMessage,omitempty"`
- // Specify the strategy used to merge the pull request during completion. If MergeStrategy is not set to any value, a no-FF merge will be created if SquashMerge == false. If MergeStrategy is not set to any value, the pull request commits will be squash if SquashMerge == true. The SquashMerge member is deprecated. It is recommended that you explicitly set MergeStrategy in all cases. If an explicit value is provided for MergeStrategy, the SquashMerge member will be ignored.
+ // Specify the strategy used to merge the pull request during completion. If MergeStrategy is not set to any value, a no-FF merge will be created if SquashMerge == false. If MergeStrategy is not set to any value, the pull request commits will be squashed if SquashMerge == true. The SquashMerge property is deprecated. It is recommended that you explicitly set MergeStrategy in all cases. If an explicit value is provided for MergeStrategy, the SquashMerge property will be ignored.
MergeStrategy *GitPullRequestMergeStrategy `json:"mergeStrategy,omitempty"`
// SquashMerge is deprecated. You should explicitly set the value of MergeStrategy. If MergeStrategy is set to any value, the SquashMerge value will be ignored. If MergeStrategy is not set, the merge strategy will be no-fast-forward if this flag is false, or squash if true.
SquashMerge *bool `json:"squashMerge,omitempty"`
@@ -1565,6 +1569,8 @@ type GitPullRequestIterationChanges struct {
// The options which are used when a pull request merge is created.
type GitPullRequestMergeOptions struct {
+ // If true, conflict resolutions applied during the merge will be put in separate commits to preserve authorship info for git blame, etc.
+ ConflictAuthorshipCommits *bool `json:"conflictAuthorshipCommits,omitempty"`
DetectRenameFalsePositives *bool `json:"detectRenameFalsePositives,omitempty"`
// If true, rename detection will not be performed during the merge.
DisableRenames *bool `json:"disableRenames,omitempty"`
@@ -1767,6 +1773,8 @@ type GitQueryCommitsCriteria struct {
ItemPath *string `json:"itemPath,omitempty"`
// If provided, identifies the commit or branch to search
ItemVersion *GitVersionDescriptor `json:"itemVersion,omitempty"`
+ // If enabled, this option will ignore the itemVersion and compareVersion parameters
+ ShowOldestCommitsFirst *bool `json:"showOldestCommitsFirst,omitempty"`
// If provided, an upper bound for filtering commits alphabetically
ToCommitId *string `json:"toCommitId,omitempty"`
// If provided, only include history entries created before this date (string)
@@ -2373,6 +2381,10 @@ type IdentityRefWithVote struct {
ProfileUrl *string `json:"profileUrl,omitempty"`
// Deprecated - use Domain+PrincipalName instead
UniqueName *string `json:"uniqueName,omitempty"`
+ // Indicates if this reviewer has declined to review this pull request.
+ HasDeclined *bool `json:"hasDeclined,omitempty"`
+ // Indicates if this reviewer is flagged for attention on this pull request.
+ IsFlagged *bool `json:"isFlagged,omitempty"`
// Indicates if this is a required reviewer for this pull request.
Branches can have policies that require particular reviewers are required for pull requests.
IsRequired *bool `json:"isRequired,omitempty"`
// URL to retrieve information about this identity
@@ -2753,6 +2765,7 @@ var SupportedIdeTypeValues = supportedIdeTypeValuesType{
WebStorm: "webStorm",
}
+// Class representing a branch object.
type TfvcBranch struct {
// Path for the branch.
Path *string `json:"path,omitempty"`
@@ -2760,7 +2773,7 @@ type TfvcBranch struct {
Links interface{} `json:"_links,omitempty"`
// Creation date of the branch.
CreatedDate *azuredevops.Time `json:"createdDate,omitempty"`
- // Description of the branch.
+ // Branch description.
Description *string `json:"description,omitempty"`
// Is the branch deleted?
IsDeleted *bool `json:"isDeleted,omitempty"`
@@ -2778,6 +2791,7 @@ type TfvcBranch struct {
RelatedBranches *[]TfvcShallowBranchRef `json:"relatedBranches,omitempty"`
}
+// A branch mapping.
type TfvcBranchMapping struct {
// Depth of the branch.
Depth *string `json:"depth,omitempty"`
@@ -2787,6 +2801,7 @@ type TfvcBranchMapping struct {
Type *string `json:"type,omitempty"`
}
+// Metadata for a branchref.
type TfvcBranchRef struct {
// Path for the branch.
Path *string `json:"path,omitempty"`
@@ -2794,7 +2809,7 @@ type TfvcBranchRef struct {
Links interface{} `json:"_links,omitempty"`
// Creation date of the branch.
CreatedDate *azuredevops.Time `json:"createdDate,omitempty"`
- // Description of the branch.
+ // Branch description.
Description *string `json:"description,omitempty"`
// Is the branch deleted?
IsDeleted *bool `json:"isDeleted,omitempty"`
@@ -2804,6 +2819,7 @@ type TfvcBranchRef struct {
Url *string `json:"url,omitempty"`
}
+// A change.
type TfvcChange struct {
// The type of change that was made to the item.
ChangeType *VersionControlChangeType `json:"changeType,omitempty"`
@@ -2821,14 +2837,15 @@ type TfvcChange struct {
PendingVersion *int `json:"pendingVersion,omitempty"`
}
+// A collection of changes.
type TfvcChangeset struct {
// A collection of REST reference links.
Links interface{} `json:"_links,omitempty"`
- // Alias or display name of user
+ // Alias or display name of user.
Author *webapi.IdentityRef `json:"author,omitempty"`
- // Id of the changeset.
+ // Changeset Id.
ChangesetId *int `json:"changesetId,omitempty"`
- // Alias or display name of user
+ // Alias or display name of user.
CheckedInBy *webapi.IdentityRef `json:"checkedInBy,omitempty"`
// Comment for the changeset.
Comment *string `json:"comment,omitempty"`
@@ -2838,15 +2855,15 @@ type TfvcChangeset struct {
CreatedDate *azuredevops.Time `json:"createdDate,omitempty"`
// URL to retrieve the item.
Url *string `json:"url,omitempty"`
- // Account Id of the changeset.
+ // Changeset Account Id also known as Organization Id.
AccountId *uuid.UUID `json:"accountId,omitempty"`
// List of associated changes.
Changes *[]TfvcChange `json:"changes,omitempty"`
- // Checkin Notes for the changeset.
+ // List of Checkin Notes for the changeset.
CheckinNotes *[]CheckinNote `json:"checkinNotes,omitempty"`
- // Collection Id of the changeset.
+ // Changeset collection Id.
CollectionId *uuid.UUID `json:"collectionId,omitempty"`
- // Are more changes available.
+ // True if more changes are available.
HasMoreChanges *bool `json:"hasMoreChanges,omitempty"`
// Policy Override for the changeset.
PolicyOverride *TfvcPolicyOverrideInfo `json:"policyOverride,omitempty"`
@@ -2856,14 +2873,15 @@ type TfvcChangeset struct {
WorkItems *[]AssociatedWorkItem `json:"workItems,omitempty"`
}
+// Metadata for a changeset.
type TfvcChangesetRef struct {
// A collection of REST reference links.
Links interface{} `json:"_links,omitempty"`
- // Alias or display name of user
+ // Alias or display name of user.
Author *webapi.IdentityRef `json:"author,omitempty"`
- // Id of the changeset.
+ // Changeset Id.
ChangesetId *int `json:"changesetId,omitempty"`
- // Alias or display name of user
+ // Alias or display name of user.
CheckedInBy *webapi.IdentityRef `json:"checkedInBy,omitempty"`
// Comment for the changeset.
Comment *string `json:"comment,omitempty"`
@@ -2875,31 +2893,32 @@ type TfvcChangesetRef struct {
Url *string `json:"url,omitempty"`
}
-// Criteria used in a search for change lists
+// Criteria used in a search for change lists.
type TfvcChangesetSearchCriteria struct {
- // Alias or display name of user who made the changes
+ // Alias or display name of user who made the changes.
Author *string `json:"author,omitempty"`
- // Whether or not to follow renames for the given item being queried
+ // Whether or not to follow renames for the given item being queried.
FollowRenames *bool `json:"followRenames,omitempty"`
- // If provided, only include changesets created after this date (string) Think of a better name for this.
+ // If provided, only include changesets created after this date (string).
FromDate *string `json:"fromDate,omitempty"`
- // If provided, only include changesets after this changesetID
+ // If provided, only include changesets after this changesetID.
FromId *int `json:"fromId,omitempty"`
- // Whether to include the _links field on the shallow references
+ // Whether to include the _links field on the shallow references.
IncludeLinks *bool `json:"includeLinks,omitempty"`
- // Path of item to search under
+ // Path of item to search under.
ItemPath *string `json:"itemPath,omitempty"`
Mappings *[]TfvcMappingFilter `json:"mappings,omitempty"`
- // If provided, only include changesets created before this date (string) Think of a better name for this.
+ // If provided, only include changesets created before this date (string).
ToDate *string `json:"toDate,omitempty"`
- // If provided, a version descriptor for the latest change list to include
+ // If provided, a version descriptor for the latest change list to include.
ToId *int `json:"toId,omitempty"`
}
+// Request body for Get batched changesets.
type TfvcChangesetsRequestData struct {
// List of changeset Ids.
ChangesetIds *[]int `json:"changesetIds,omitempty"`
- // Length of the comment.
+ // Max length of the comment.
CommentLength *int `json:"commentLength,omitempty"`
// Whether to include the _links field on the shallow references
IncludeLinks *bool `json:"includeLinks,omitempty"`
@@ -2923,6 +2942,7 @@ type TfvcHistoryEntry struct {
FileId *int `json:"fileId,omitempty"`
}
+// Metadata for an item.
type TfvcItem struct {
Links interface{} `json:"_links,omitempty"`
Content *string `json:"content,omitempty"`
@@ -2931,28 +2951,39 @@ type TfvcItem struct {
IsSymLink *bool `json:"isSymLink,omitempty"`
Path *string `json:"path,omitempty"`
Url *string `json:"url,omitempty"`
- ChangeDate *azuredevops.Time `json:"changeDate,omitempty"`
- DeletionId *int `json:"deletionId,omitempty"`
+ // Item changed datetime.
+ ChangeDate *azuredevops.Time `json:"changeDate,omitempty"`
+ // Greater than 0 if item is deleted.
+ DeletionId *int `json:"deletionId,omitempty"`
// File encoding from database, -1 represents binary.
Encoding *int `json:"encoding,omitempty"`
// MD5 hash as a base 64 string, applies to files only.
- HashValue *string `json:"hashValue,omitempty"`
- IsBranch *bool `json:"isBranch,omitempty"`
- IsPendingChange *bool `json:"isPendingChange,omitempty"`
+ HashValue *string `json:"hashValue,omitempty"`
+ // True if item is a branch.
+ IsBranch *bool `json:"isBranch,omitempty"`
+ // True if there is a change pending.
+ IsPendingChange *bool `json:"isPendingChange,omitempty"`
// The size of the file, if applicable.
- Size *uint64 `json:"size,omitempty"`
- Version *int `json:"version,omitempty"`
+ Size *uint64 `json:"size,omitempty"`
+ // Changeset version Id.
+ Version *int `json:"version,omitempty"`
}
// Item path and Version descriptor properties
type TfvcItemDescriptor struct {
- Path *string `json:"path,omitempty"`
+ // Item path.
+ Path *string `json:"path,omitempty"`
+ // Defaults to OneLevel.
RecursionLevel *VersionControlRecursionType `json:"recursionLevel,omitempty"`
- Version *string `json:"version,omitempty"`
- VersionOption *TfvcVersionOption `json:"versionOption,omitempty"`
- VersionType *TfvcVersionType `json:"versionType,omitempty"`
+ // Specify the desired version, can be null or empty string only if VersionType is latest or tip.
+ Version *string `json:"version,omitempty"`
+ // Defaults to None.
+ VersionOption *TfvcVersionOption `json:"versionOption,omitempty"`
+ // Defaults to Latest.
+ VersionType *TfvcVersionType `json:"versionType,omitempty"`
}
+// Metadata for an item including the previous hash value for files.
type TfvcItemPreviousHash struct {
Links interface{} `json:"_links,omitempty"`
Content *string `json:"content,omitempty"`
@@ -2961,21 +2992,27 @@ type TfvcItemPreviousHash struct {
IsSymLink *bool `json:"isSymLink,omitempty"`
Path *string `json:"path,omitempty"`
Url *string `json:"url,omitempty"`
- ChangeDate *azuredevops.Time `json:"changeDate,omitempty"`
- DeletionId *int `json:"deletionId,omitempty"`
+ // Item changed datetime.
+ ChangeDate *azuredevops.Time `json:"changeDate,omitempty"`
+ // Greater than 0 if item is deleted.
+ DeletionId *int `json:"deletionId,omitempty"`
// File encoding from database, -1 represents binary.
Encoding *int `json:"encoding,omitempty"`
// MD5 hash as a base 64 string, applies to files only.
- HashValue *string `json:"hashValue,omitempty"`
- IsBranch *bool `json:"isBranch,omitempty"`
- IsPendingChange *bool `json:"isPendingChange,omitempty"`
+ HashValue *string `json:"hashValue,omitempty"`
+ // True if item is a branch.
+ IsBranch *bool `json:"isBranch,omitempty"`
+ // True if there is a change pending.
+ IsPendingChange *bool `json:"isPendingChange,omitempty"`
// The size of the file, if applicable.
- Size *uint64 `json:"size,omitempty"`
- Version *int `json:"version,omitempty"`
+ Size *uint64 `json:"size,omitempty"`
+ // Changeset version Id.
+ Version *int `json:"version,omitempty"`
// MD5 hash as a base 64 string, applies to files only.
PreviousHashValue *string `json:"previousHashValue,omitempty"`
}
+// Request body used by Get Items Batch
type TfvcItemRequestData struct {
// If true, include metadata about the file type
IncludeContentMetadata *bool `json:"includeContentMetadata,omitempty"`
@@ -2984,27 +3021,46 @@ type TfvcItemRequestData struct {
ItemDescriptors *[]TfvcItemDescriptor `json:"itemDescriptors,omitempty"`
}
+// Metadata for a label.
type TfvcLabel struct {
- Links interface{} `json:"_links,omitempty"`
- Description *string `json:"description,omitempty"`
- Id *int `json:"id,omitempty"`
- LabelScope *string `json:"labelScope,omitempty"`
- ModifiedDate *azuredevops.Time `json:"modifiedDate,omitempty"`
- Name *string `json:"name,omitempty"`
- Owner *webapi.IdentityRef `json:"owner,omitempty"`
- Url *string `json:"url,omitempty"`
- Items *[]TfvcItem `json:"items,omitempty"`
+ // Collection of reference links.
+ Links interface{} `json:"_links,omitempty"`
+ // Label description.
+ Description *string `json:"description,omitempty"`
+ // Label Id.
+ Id *int `json:"id,omitempty"`
+ // Label scope.
+ LabelScope *string `json:"labelScope,omitempty"`
+ // Last modified datetime for the label.
+ ModifiedDate *azuredevops.Time `json:"modifiedDate,omitempty"`
+ // Label name.
+ Name *string `json:"name,omitempty"`
+ // Label owner.
+ Owner *webapi.IdentityRef `json:"owner,omitempty"`
+ // Label Url.
+ Url *string `json:"url,omitempty"`
+ // List of items.
+ Items *[]TfvcItem `json:"items,omitempty"`
}
+// Metadata for a Label.
type TfvcLabelRef struct {
- Links interface{} `json:"_links,omitempty"`
- Description *string `json:"description,omitempty"`
- Id *int `json:"id,omitempty"`
- LabelScope *string `json:"labelScope,omitempty"`
- ModifiedDate *azuredevops.Time `json:"modifiedDate,omitempty"`
- Name *string `json:"name,omitempty"`
- Owner *webapi.IdentityRef `json:"owner,omitempty"`
- Url *string `json:"url,omitempty"`
+ // Collection of reference links.
+ Links interface{} `json:"_links,omitempty"`
+ // Label description.
+ Description *string `json:"description,omitempty"`
+ // Label Id.
+ Id *int `json:"id,omitempty"`
+ // Label scope.
+ LabelScope *string `json:"labelScope,omitempty"`
+ // Last modified datetime for the label.
+ ModifiedDate *azuredevops.Time `json:"modifiedDate,omitempty"`
+ // Label name.
+ Name *string `json:"name,omitempty"`
+ // Label owner.
+ Owner *webapi.IdentityRef `json:"owner,omitempty"`
+ // Label Url.
+ Url *string `json:"url,omitempty"`
}
type TfvcLabelRequestData struct {
@@ -3017,63 +3073,93 @@ type TfvcLabelRequestData struct {
Owner *string `json:"owner,omitempty"`
}
+// MappingFilter can be used to include or exclude specific paths.
type TfvcMappingFilter struct {
- Exclude *bool `json:"exclude,omitempty"`
+ // True if ServerPath should be excluded.
+ Exclude *bool `json:"exclude,omitempty"`
+ // Path to be included or excluded.
ServerPath *string `json:"serverPath,omitempty"`
}
type TfvcMergeSource struct {
// Indicates if this a rename source. If false, it is a merge source.
IsRename *bool `json:"isRename,omitempty"`
- // The server item of the merge source
+ // The server item of the merge source.
ServerItem *string `json:"serverItem,omitempty"`
- // Start of the version range
+ // Start of the version range.
VersionFrom *int `json:"versionFrom,omitempty"`
- // End of the version range
+ // End of the version range.
VersionTo *int `json:"versionTo,omitempty"`
}
+// Policy failure information.
type TfvcPolicyFailureInfo struct {
- Message *string `json:"message,omitempty"`
+ // Policy failure message.
+ Message *string `json:"message,omitempty"`
+ // Name of the policy that failed.
PolicyName *string `json:"policyName,omitempty"`
}
+// Information on the policy override.
type TfvcPolicyOverrideInfo struct {
- Comment *string `json:"comment,omitempty"`
+ // Overidden policy comment.
+ Comment *string `json:"comment,omitempty"`
+ // Information on the failed policy that was overridden.
PolicyFailures *[]TfvcPolicyFailureInfo `json:"policyFailures,omitempty"`
}
+// This is the shallow branchref class.
type TfvcShallowBranchRef struct {
// Path for the branch.
Path *string `json:"path,omitempty"`
}
-// This is the deep shelveset class
+// Metadata for a shelveset.
type TfvcShelveset struct {
- Links interface{} `json:"_links,omitempty"`
- Comment *string `json:"comment,omitempty"`
- CommentTruncated *bool `json:"commentTruncated,omitempty"`
- CreatedDate *azuredevops.Time `json:"createdDate,omitempty"`
- Id *string `json:"id,omitempty"`
- Name *string `json:"name,omitempty"`
- Owner *webapi.IdentityRef `json:"owner,omitempty"`
- Url *string `json:"url,omitempty"`
- Changes *[]TfvcChange `json:"changes,omitempty"`
- Notes *[]CheckinNote `json:"notes,omitempty"`
- PolicyOverride *TfvcPolicyOverrideInfo `json:"policyOverride,omitempty"`
- WorkItems *[]AssociatedWorkItem `json:"workItems,omitempty"`
-}
-
-// This is the shallow shelveset class
+ // List of reference links for the shelveset.
+ Links interface{} `json:"_links,omitempty"`
+ // Shelveset comment.
+ Comment *string `json:"comment,omitempty"`
+ // Shelveset comment truncated as applicable.
+ CommentTruncated *bool `json:"commentTruncated,omitempty"`
+ // Shelveset create date.
+ CreatedDate *azuredevops.Time `json:"createdDate,omitempty"`
+ // Shelveset Id.
+ Id *string `json:"id,omitempty"`
+ // Shelveset name.
+ Name *string `json:"name,omitempty"`
+ // Shelveset Owner.
+ Owner *webapi.IdentityRef `json:"owner,omitempty"`
+ // Shelveset Url.
+ Url *string `json:"url,omitempty"`
+ // List of changes.
+ Changes *[]TfvcChange `json:"changes,omitempty"`
+ // List of checkin notes.
+ Notes *[]CheckinNote `json:"notes,omitempty"`
+ // Policy override information if applicable.
+ PolicyOverride *TfvcPolicyOverrideInfo `json:"policyOverride,omitempty"`
+ // List of associated workitems.
+ WorkItems *[]AssociatedWorkItem `json:"workItems,omitempty"`
+}
+
+// Metadata for a shallow shelveset.
type TfvcShelvesetRef struct {
- Links interface{} `json:"_links,omitempty"`
- Comment *string `json:"comment,omitempty"`
- CommentTruncated *bool `json:"commentTruncated,omitempty"`
- CreatedDate *azuredevops.Time `json:"createdDate,omitempty"`
- Id *string `json:"id,omitempty"`
- Name *string `json:"name,omitempty"`
- Owner *webapi.IdentityRef `json:"owner,omitempty"`
- Url *string `json:"url,omitempty"`
+ // List of reference links for the shelveset.
+ Links interface{} `json:"_links,omitempty"`
+ // Shelveset comment.
+ Comment *string `json:"comment,omitempty"`
+ // Shelveset comment truncated as applicable.
+ CommentTruncated *bool `json:"commentTruncated,omitempty"`
+ // Shelveset create date.
+ CreatedDate *azuredevops.Time `json:"createdDate,omitempty"`
+ // Shelveset Id.
+ Id *string `json:"id,omitempty"`
+ // Shelveset name.
+ Name *string `json:"name,omitempty"`
+ // Shelveset Owner.
+ Owner *webapi.IdentityRef `json:"owner,omitempty"`
+ // Shelveset Url.
+ Url *string `json:"url,omitempty"`
}
type TfvcShelvesetRequestData struct {
@@ -3087,7 +3173,7 @@ type TfvcShelvesetRequestData struct {
MaxChangeCount *int `json:"maxChangeCount,omitempty"`
// Max length of comment
MaxCommentLength *int `json:"maxCommentLength,omitempty"`
- // Shelveset's name
+ // Shelveset name
Name *string `json:"name,omitempty"`
// Owner's ID. Could be a name or a guid.
Owner *string `json:"owner,omitempty"`
@@ -3100,12 +3186,15 @@ type TfvcStatistics struct {
FileCountTotal *uint64 `json:"fileCountTotal,omitempty"`
}
+// Version descriptor properties.
type TfvcVersionDescriptor struct {
+ // Version object.
Version *string `json:"version,omitempty"`
VersionOption *TfvcVersionOption `json:"versionOption,omitempty"`
VersionType *TfvcVersionType `json:"versionType,omitempty"`
}
+// Options for Version handling.
type TfvcVersionOption string
type tfvcVersionOptionValuesType struct {
@@ -3115,11 +3204,15 @@ type tfvcVersionOptionValuesType struct {
}
var TfvcVersionOptionValues = tfvcVersionOptionValuesType{
- None: "none",
- Previous: "previous",
+ // None.
+ None: "none",
+ // Return the previous version.
+ Previous: "previous",
+ // Only usuable with versiontype MergeSource and integer versions, uses RenameSource identifier instead of Merge identifier.
UseRename: "useRename",
}
+// Type of Version object
type TfvcVersionType string
type tfvcVersionTypeValuesType struct {
@@ -3134,13 +3227,21 @@ type tfvcVersionTypeValuesType struct {
}
var TfvcVersionTypeValues = tfvcVersionTypeValuesType{
- None: "none",
- Changeset: "changeset",
- Shelveset: "shelveset",
- Change: "change",
- Date: "date",
- Latest: "latest",
- Tip: "tip",
+ // Version is treated as a ChangesetId.
+ None: "none",
+ // Version is treated as a ChangesetId.
+ Changeset: "changeset",
+ // Version is treated as a Shelveset name and owner.
+ Shelveset: "shelveset",
+ // Version is treated as a Change.
+ Change: "change",
+ // Version is treated as a Date.
+ Date: "date",
+ // If Version is defined the Latest of that Version will be used, if no version is defined the latest ChangesetId will be used.
+ Latest: "latest",
+ // Version will be treated as a Tip, if no version is defined latest will be used.
+ Tip: "tip",
+ // Version will be treated as a MergeSource.
MergeSource: "mergeSource",
}
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/go.mod b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/go.mod
new file mode 100644
index 000000000..d012a0ae2
--- /dev/null
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/go.mod
@@ -0,0 +1,5 @@
+module github.com/microsoft/azure-devops-go-api/azuredevops/v6
+
+go 1.12
+
+require github.com/google/uuid v1.1.1
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/go.sum b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/go.sum
new file mode 100644
index 000000000..b864886e0
--- /dev/null
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/go.sum
@@ -0,0 +1,2 @@
+github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
+github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/graph/client.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/graph/client.go
similarity index 89%
rename from vendor/github.com/microsoft/azure-devops-go-api/azuredevops/graph/client.go
rename to vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/graph/client.go
index d422e1641..3938d39da 100644
--- a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/graph/client.go
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/graph/client.go
@@ -13,9 +13,9 @@ import (
"context"
"encoding/json"
"github.com/google/uuid"
- "github.com/microsoft/azure-devops-go-api/azuredevops"
- "github.com/microsoft/azure-devops-go-api/azuredevops/profile"
- "github.com/microsoft/azure-devops-go-api/azuredevops/webapi"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/profile"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/webapi"
"net/http"
"net/url"
"strconv"
@@ -63,6 +63,8 @@ type Client interface {
ListUsers(context.Context, ListUsersArgs) (*PagedGraphUsers, error)
// [Preview API] Resolve descriptors to users, groups or scopes (Subjects) in a batch.
LookupSubjects(context.Context, LookupSubjectsArgs) (*map[string]GraphSubject, error)
+ // [Preview API] Search for Azure Devops users, or/and groups. Results will be returned in a batch with no more than 100 graph subjects.
+ QuerySubjects(context.Context, QuerySubjectsArgs) (*[]GraphSubject, error)
// [Preview API] Deletes a membership between a container and subject.
RemoveMembership(context.Context, RemoveMembershipArgs) error
// [Preview API]
@@ -102,7 +104,7 @@ func (client *ClientImpl) AddMembership(ctx context.Context, args AddMembershipA
routeValues["containerDescriptor"] = *args.ContainerDescriptor
locationId, _ := uuid.Parse("3fd2e6ca-fb30-443a-b579-95b19ed0934c")
- resp, err := client.Client.Send(ctx, http.MethodPut, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPut, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -133,7 +135,7 @@ func (client *ClientImpl) CheckMembershipExistence(ctx context.Context, args Che
routeValues["containerDescriptor"] = *args.ContainerDescriptor
locationId, _ := uuid.Parse("3fd2e6ca-fb30-443a-b579-95b19ed0934c")
- _, err := client.Client.Send(ctx, http.MethodHead, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodHead, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return err
}
@@ -167,7 +169,7 @@ func (client *ClientImpl) CreateGroup(ctx context.Context, args CreateGroupArgs)
return nil, marshalErr
}
locationId, _ := uuid.Parse("ebbe6af8-0b91-4c13-8cf1-777c14858188")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.1", nil, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.1", nil, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -202,7 +204,7 @@ func (client *ClientImpl) CreateUser(ctx context.Context, args CreateUserArgs) (
return nil, marshalErr
}
locationId, _ := uuid.Parse("005e26ec-6b77-4e4f-a986-b3827bf241f5")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.1", nil, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.1", nil, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -229,7 +231,7 @@ func (client *ClientImpl) DeleteAvatar(ctx context.Context, args DeleteAvatarArg
routeValues["subjectDescriptor"] = *args.SubjectDescriptor
locationId, _ := uuid.Parse("801eaf9c-0585-4be8-9cdb-b0efa074de91")
- _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return err
}
@@ -252,7 +254,7 @@ func (client *ClientImpl) DeleteGroup(ctx context.Context, args DeleteGroupArgs)
routeValues["groupDescriptor"] = *args.GroupDescriptor
locationId, _ := uuid.Parse("ebbe6af8-0b91-4c13-8cf1-777c14858188")
- _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return err
}
@@ -275,7 +277,7 @@ func (client *ClientImpl) DeleteUser(ctx context.Context, args DeleteUserArgs) e
routeValues["userDescriptor"] = *args.UserDescriptor
locationId, _ := uuid.Parse("005e26ec-6b77-4e4f-a986-b3827bf241f5")
- _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return err
}
@@ -305,7 +307,7 @@ func (client *ClientImpl) GetAvatar(ctx context.Context, args GetAvatarArgs) (*p
queryParams.Add("format", *args.Format)
}
locationId, _ := uuid.Parse("801eaf9c-0585-4be8-9cdb-b0efa074de91")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -334,7 +336,7 @@ func (client *ClientImpl) GetDescriptor(ctx context.Context, args GetDescriptorA
routeValues["storageKey"] = (*args.StorageKey).String()
locationId, _ := uuid.Parse("048aee0a-7072-4cde-ab73-7af77b1e0b4e")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -359,7 +361,7 @@ func (client *ClientImpl) GetGroup(ctx context.Context, args GetGroupArgs) (*Gra
routeValues["groupDescriptor"] = *args.GroupDescriptor
locationId, _ := uuid.Parse("ebbe6af8-0b91-4c13-8cf1-777c14858188")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -388,7 +390,7 @@ func (client *ClientImpl) GetMembership(ctx context.Context, args GetMembershipA
routeValues["containerDescriptor"] = *args.ContainerDescriptor
locationId, _ := uuid.Parse("3fd2e6ca-fb30-443a-b579-95b19ed0934c")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -415,7 +417,7 @@ func (client *ClientImpl) GetMembershipState(ctx context.Context, args GetMember
routeValues["subjectDescriptor"] = *args.SubjectDescriptor
locationId, _ := uuid.Parse("1ffe5c94-1144-4191-907b-d0211cad36a8")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -440,7 +442,7 @@ func (client *ClientImpl) GetProviderInfo(ctx context.Context, args GetProviderI
routeValues["userDescriptor"] = *args.UserDescriptor
locationId, _ := uuid.Parse("1e377995-6fa2-4588-bd64-930186abdcfa")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -465,7 +467,7 @@ func (client *ClientImpl) GetStorageKey(ctx context.Context, args GetStorageKeyA
routeValues["subjectDescriptor"] = *args.SubjectDescriptor
locationId, _ := uuid.Parse("eb85f8cc-f0f6-4264-a5b1-ffe2e4d4801f")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -490,7 +492,7 @@ func (client *ClientImpl) GetUser(ctx context.Context, args GetUserArgs) (*Graph
routeValues["userDescriptor"] = *args.UserDescriptor
locationId, _ := uuid.Parse("005e26ec-6b77-4e4f-a986-b3827bf241f5")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -520,7 +522,7 @@ func (client *ClientImpl) ListGroups(ctx context.Context, args ListGroupsArgs) (
queryParams.Add("continuationToken", *args.ContinuationToken)
}
locationId, _ := uuid.Parse("ebbe6af8-0b91-4c13-8cf1-777c14858188")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", nil, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", nil, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -565,7 +567,7 @@ func (client *ClientImpl) ListMemberships(ctx context.Context, args ListMembersh
queryParams.Add("depth", strconv.Itoa(*args.Depth))
}
locationId, _ := uuid.Parse("e34b6394-6b30-4435-94a9-409a5eef3e31")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -595,8 +597,11 @@ func (client *ClientImpl) ListUsers(ctx context.Context, args ListUsersArgs) (*P
if args.ContinuationToken != nil {
queryParams.Add("continuationToken", *args.ContinuationToken)
}
+ if args.ScopeDescriptor != nil {
+ queryParams.Add("scopeDescriptor", *args.ScopeDescriptor)
+ }
locationId, _ := uuid.Parse("005e26ec-6b77-4e4f-a986-b3827bf241f5")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", nil, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", nil, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -621,6 +626,8 @@ type ListUsersArgs struct {
SubjectTypes *[]string
// (optional) An opaque data blob that allows the next page of data to resume immediately after where the previous page ended. The only reliable way to know if there is more data left is the presence of a continuation token.
ContinuationToken *string
+ // (optional) Specify a non-default scope (collection, project) to search for users.
+ ScopeDescriptor *string
}
// [Preview API] Resolve descriptors to users, groups or scopes (Subjects) in a batch.
@@ -633,7 +640,7 @@ func (client *ClientImpl) LookupSubjects(ctx context.Context, args LookupSubject
return nil, marshalErr
}
locationId, _ := uuid.Parse("4dd4d168-11f2-48c4-83e8-756fa0de027c")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.1", nil, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.1", nil, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -649,6 +656,32 @@ type LookupSubjectsArgs struct {
SubjectLookup *GraphSubjectLookup
}
+// [Preview API] Search for Azure Devops users, or/and groups. Results will be returned in a batch with no more than 100 graph subjects.
+func (client *ClientImpl) QuerySubjects(ctx context.Context, args QuerySubjectsArgs) (*[]GraphSubject, error) {
+ if args.SubjectQuery == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.SubjectQuery"}
+ }
+ body, marshalErr := json.Marshal(*args.SubjectQuery)
+ if marshalErr != nil {
+ return nil, marshalErr
+ }
+ locationId, _ := uuid.Parse("05942c89-006a-48ce-bb79-baeb8abf99c6")
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.1", nil, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []GraphSubject
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the QuerySubjects function
+type QuerySubjectsArgs struct {
+ // (required) The query that we'll be using to search includes the following: Query: the search term. The search will be prefix matching only. SubjectKind: "User" or "Group" can be specified, both or either ScopeDescriptor: Non-default scope can be specified, i.e. project scope descriptor
+ SubjectQuery *GraphSubjectQuery
+}
+
// [Preview API] Deletes a membership between a container and subject.
func (client *ClientImpl) RemoveMembership(ctx context.Context, args RemoveMembershipArgs) error {
routeValues := make(map[string]string)
@@ -662,7 +695,7 @@ func (client *ClientImpl) RemoveMembership(ctx context.Context, args RemoveMembe
routeValues["containerDescriptor"] = *args.ContainerDescriptor
locationId, _ := uuid.Parse("3fd2e6ca-fb30-443a-b579-95b19ed0934c")
- _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return err
}
@@ -680,15 +713,15 @@ type RemoveMembershipArgs struct {
// [Preview API]
func (client *ClientImpl) RequestAccess(ctx context.Context, args RequestAccessArgs) error {
- if args.Message == nil {
- return &azuredevops.ArgumentNilError{ArgumentName: "args.Message"}
+ if args.Jsondocument == nil {
+ return &azuredevops.ArgumentNilError{ArgumentName: "args.Jsondocument"}
}
- body, marshalErr := json.Marshal(*args.Message)
+ body, marshalErr := json.Marshal(args.Jsondocument)
if marshalErr != nil {
return marshalErr
}
locationId, _ := uuid.Parse("8d54bf92-8c99-47f2-9972-b21341f1722e")
- _, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.1", nil, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.1", nil, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return err
}
@@ -699,7 +732,7 @@ func (client *ClientImpl) RequestAccess(ctx context.Context, args RequestAccessA
// Arguments for the RequestAccess function
type RequestAccessArgs struct {
// (required)
- Message *string
+ Jsondocument interface{}
}
// [Preview API]
@@ -718,7 +751,7 @@ func (client *ClientImpl) SetAvatar(ctx context.Context, args SetAvatarArgs) err
return marshalErr
}
locationId, _ := uuid.Parse("801eaf9c-0585-4be8-9cdb-b0efa074de91")
- _, err := client.Client.Send(ctx, http.MethodPut, locationId, "5.1-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodPut, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return err
}
@@ -750,7 +783,7 @@ func (client *ClientImpl) UpdateGroup(ctx context.Context, args UpdateGroupArgs)
return nil, marshalErr
}
locationId, _ := uuid.Parse("ebbe6af8-0b91-4c13-8cf1-777c14858188")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1-preview.1", routeValues, nil, bytes.NewReader(body), "application/json-patch+json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json-patch+json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -784,7 +817,7 @@ func (client *ClientImpl) UpdateUser(ctx context.Context, args UpdateUserArgs) (
return nil, marshalErr
}
locationId, _ := uuid.Parse("005e26ec-6b77-4e4f-a986-b3827bf241f5")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/graph/models.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/graph/models.go
similarity index 96%
rename from vendor/github.com/microsoft/azure-devops-go-api/azuredevops/graph/models.go
rename to vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/graph/models.go
index 8c56bb38e..a2e7c85c2 100644
--- a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/graph/models.go
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/graph/models.go
@@ -10,7 +10,7 @@ package graph
import (
"github.com/google/uuid"
- "github.com/microsoft/azure-devops-go-api/azuredevops/identity"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/identity"
)
type GraphCachePolicies struct {
@@ -122,38 +122,6 @@ type GraphMember struct {
PrincipalName *string `json:"principalName,omitempty"`
}
-type GraphMemberSearchFactor string
-
-type graphMemberSearchFactorValuesType struct {
- PrincipalName GraphMemberSearchFactor
- DisplayName GraphMemberSearchFactor
- AdministratorsGroup GraphMemberSearchFactor
- Identifier GraphMemberSearchFactor
- MailAddress GraphMemberSearchFactor
- General GraphMemberSearchFactor
- Alias GraphMemberSearchFactor
- DirectoryAlias GraphMemberSearchFactor
-}
-
-var GraphMemberSearchFactorValues = graphMemberSearchFactorValuesType{
- // Domain qualified account name (domain\alias)
- PrincipalName: "principalName",
- // Display name
- DisplayName: "displayName",
- // Administrators group
- AdministratorsGroup: "administratorsGroup",
- // Find the identity using the identifier (SID)
- Identifier: "identifier",
- // Email address
- MailAddress: "mailAddress",
- // A general search for an identity.
- General: "general",
- // Alternate login username (Basic Auth Alias)
- Alias: "alias",
- // Find identity using DirectoryAlias
- DirectoryAlias: "directoryAlias",
-}
-
// Relationship between a container and a member
type GraphMembership struct {
// This field contains zero or more interesting links about the graph membership. These links may be invoked to obtain additional relationships or more detailed information about this graph membership.
@@ -288,6 +256,16 @@ type GraphSubjectLookupKey struct {
Descriptor *string `json:"descriptor,omitempty"`
}
+// Subject to search using the Graph API
+type GraphSubjectQuery struct {
+ // Search term to search for Azure Devops users or/and groups
+ Query *string `json:"query,omitempty"`
+ // Optional parameter. Specify a non-default scope (collection, project) to search for users or groups within the scope.
+ ScopeDescriptor *string `json:"scopeDescriptor,omitempty"`
+ // "User" or "Group" can be specified, both or either
+ SubjectKind *[]string `json:"subjectKind,omitempty"`
+}
+
type GraphSystemSubject struct {
// This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject.
Links interface{} `json:"_links,omitempty"`
@@ -411,3 +389,9 @@ type PagedGraphUsers struct {
// The enumerable set of users found within a page.
GraphUsers *[]GraphUser `json:"graphUsers,omitempty"`
}
+
+type RequestAccessPayLoad struct {
+ Message *string `json:"message,omitempty"`
+ ProjectUri *string `json:"projectUri,omitempty"`
+ UrlRequested *string `json:"urlRequested,omitempty"`
+}
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/identity/client.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/identity/client.go
new file mode 100644
index 000000000..1fb73c84b
--- /dev/null
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/identity/client.go
@@ -0,0 +1,1044 @@
+// --------------------------------------------------------------------------------------------
+// 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 identity
+
+import (
+ "bytes"
+ "context"
+ "encoding/json"
+ "github.com/google/uuid"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/delegatedauthorization"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/webapi"
+ "net/http"
+ "net/url"
+ "strconv"
+)
+
+var ResourceAreaId, _ = uuid.Parse("8a3d49b8-91f0-46ef-b33d-dda338c25db3")
+
+type Client interface {
+ // [Preview API]
+ AddMember(context.Context, AddMemberArgs) (*bool, error)
+ CreateGroups(context.Context, CreateGroupsArgs) (*[]Identity, error)
+ CreateIdentity(context.Context, CreateIdentityArgs) (*Identity, error)
+ // [Preview API]
+ CreateOrBindWithClaims(context.Context, CreateOrBindWithClaimsArgs) (*Identity, error)
+ // [Preview API]
+ CreateScope(context.Context, CreateScopeArgs) (*IdentityScope, error)
+ DeleteGroup(context.Context, DeleteGroupArgs) error
+ // [Preview API]
+ DeleteScope(context.Context, DeleteScopeArgs) error
+ // [Preview API]
+ ForceRemoveMember(context.Context, ForceRemoveMemberArgs) (*bool, error)
+ // [Preview API]
+ GetDescriptorById(context.Context, GetDescriptorByIdArgs) (*string, error)
+ GetIdentityChanges(context.Context, GetIdentityChangesArgs) (*ChangedIdentities, error)
+ // [Preview API]
+ GetIdentitySnapshot(context.Context, GetIdentitySnapshotArgs) (*IdentitySnapshot, error)
+ // Read the max sequence id of all the identities.
+ GetMaxSequenceId(context.Context, GetMaxSequenceIdArgs) (*uint64, error)
+ // [Preview API]
+ GetScopeById(context.Context, GetScopeByIdArgs) (*IdentityScope, error)
+ // [Preview API]
+ GetScopeByName(context.Context, GetScopeByNameArgs) (*IdentityScope, error)
+ // Read identity of the home tenant request user.
+ GetSelf(context.Context, GetSelfArgs) (*IdentitySelf, error)
+ // [Preview API]
+ GetSignedInToken(context.Context, GetSignedInTokenArgs) (*delegatedauthorization.AccessTokenResult, error)
+ // [Preview API]
+ GetSignoutToken(context.Context, GetSignoutTokenArgs) (*delegatedauthorization.AccessTokenResult, error)
+ // [Preview API]
+ GetTenant(context.Context, GetTenantArgs) (*TenantInfo, error)
+ GetUserIdentityIdsByDomainId(context.Context, GetUserIdentityIdsByDomainIdArgs) (*[]uuid.UUID, error)
+ ListGroups(context.Context, ListGroupsArgs) (*[]Identity, error)
+ // Resolve legacy identity information for use with older APIs such as the Security APIs
+ ReadIdentities(context.Context, ReadIdentitiesArgs) (*[]Identity, error)
+ ReadIdentitiesByScope(context.Context, ReadIdentitiesByScopeArgs) (*[]Identity, error)
+ ReadIdentity(context.Context, ReadIdentityArgs) (*Identity, error)
+ // [Preview API]
+ ReadIdentityBatch(context.Context, ReadIdentityBatchArgs) (*[]Identity, error)
+ // [Preview API]
+ ReadMember(context.Context, ReadMemberArgs) (*string, error)
+ // [Preview API]
+ ReadMemberOf(context.Context, ReadMemberOfArgs) (*string, error)
+ // [Preview API]
+ ReadMembers(context.Context, ReadMembersArgs) (*[]string, error)
+ // [Preview API]
+ ReadMembersOf(context.Context, ReadMembersOfArgs) (*[]string, error)
+ // [Preview API]
+ RemoveMember(context.Context, RemoveMemberArgs) (*bool, error)
+ UpdateIdentities(context.Context, UpdateIdentitiesArgs) (*[]IdentityUpdateData, error)
+ UpdateIdentity(context.Context, UpdateIdentityArgs) error
+ // [Preview API]
+ UpdateScope(context.Context, UpdateScopeArgs) error
+}
+
+type ClientImpl struct {
+ Client azuredevops.Client
+}
+
+func NewClient(ctx context.Context, connection *azuredevops.Connection) (Client, error) {
+ client, err := connection.GetClientByResourceAreaId(ctx, ResourceAreaId)
+ if err != nil {
+ return nil, err
+ }
+ return &ClientImpl{
+ Client: *client,
+ }, nil
+}
+
+// [Preview API]
+func (client *ClientImpl) AddMember(ctx context.Context, args AddMemberArgs) (*bool, error) {
+ routeValues := make(map[string]string)
+ if args.ContainerId == nil || *args.ContainerId == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.ContainerId"}
+ }
+ routeValues["containerId"] = *args.ContainerId
+ if args.MemberId == nil || *args.MemberId == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.MemberId"}
+ }
+ routeValues["memberId"] = *args.MemberId
+
+ locationId, _ := uuid.Parse("8ba35978-138e-41f8-8963-7b1ea2c5f775")
+ resp, err := client.Client.Send(ctx, http.MethodPut, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue bool
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the AddMember function
+type AddMemberArgs struct {
+ // (required)
+ ContainerId *string
+ // (required)
+ MemberId *string
+}
+
+func (client *ClientImpl) CreateGroups(ctx context.Context, args CreateGroupsArgs) (*[]Identity, error) {
+ if args.Container == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.Container"}
+ }
+ body, marshalErr := json.Marshal(args.Container)
+ if marshalErr != nil {
+ return nil, marshalErr
+ }
+ locationId, _ := uuid.Parse("5966283b-4196-4d57-9211-1b68f41ec1c2")
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0", nil, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []Identity
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the CreateGroups function
+type CreateGroupsArgs struct {
+ // (required)
+ Container interface{}
+}
+
+func (client *ClientImpl) CreateIdentity(ctx context.Context, args CreateIdentityArgs) (*Identity, error) {
+ if args.FrameworkIdentityInfo == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.FrameworkIdentityInfo"}
+ }
+ body, marshalErr := json.Marshal(*args.FrameworkIdentityInfo)
+ if marshalErr != nil {
+ return nil, marshalErr
+ }
+ locationId, _ := uuid.Parse("dd55f0eb-6ea2-4fe4-9ebe-919e7dd1dfb4")
+ resp, err := client.Client.Send(ctx, http.MethodPut, locationId, "6.0", nil, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue Identity
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the CreateIdentity function
+type CreateIdentityArgs struct {
+ // (required)
+ FrameworkIdentityInfo *FrameworkIdentityInfo
+}
+
+// [Preview API]
+func (client *ClientImpl) CreateOrBindWithClaims(ctx context.Context, args CreateOrBindWithClaimsArgs) (*Identity, error) {
+ if args.SourceIdentity == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.SourceIdentity"}
+ }
+ body, marshalErr := json.Marshal(*args.SourceIdentity)
+ if marshalErr != nil {
+ return nil, marshalErr
+ }
+ locationId, _ := uuid.Parse("90ddfe71-171c-446c-bf3b-b597cd562afd")
+ resp, err := client.Client.Send(ctx, http.MethodPut, locationId, "6.0-preview.1", nil, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue Identity
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the CreateOrBindWithClaims function
+type CreateOrBindWithClaimsArgs struct {
+ // (required)
+ SourceIdentity *Identity
+}
+
+// [Preview API]
+func (client *ClientImpl) CreateScope(ctx context.Context, args CreateScopeArgs) (*IdentityScope, error) {
+ if args.Info == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.Info"}
+ }
+ routeValues := make(map[string]string)
+ if args.ScopeId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.ScopeId"}
+ }
+ routeValues["scopeId"] = (*args.ScopeId).String()
+
+ body, marshalErr := json.Marshal(*args.Info)
+ if marshalErr != nil {
+ return nil, marshalErr
+ }
+ locationId, _ := uuid.Parse("4e11e2bf-1e79-4eb5-8f34-a6337bd0de38")
+ resp, err := client.Client.Send(ctx, http.MethodPut, locationId, "6.0-preview.2", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue IdentityScope
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the CreateScope function
+type CreateScopeArgs struct {
+ // (required)
+ Info *CreateScopeInfo
+ // (required)
+ ScopeId *uuid.UUID
+}
+
+func (client *ClientImpl) DeleteGroup(ctx context.Context, args DeleteGroupArgs) error {
+ routeValues := make(map[string]string)
+ if args.GroupId == nil || *args.GroupId == "" {
+ return &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.GroupId"}
+ }
+ routeValues["groupId"] = *args.GroupId
+
+ locationId, _ := uuid.Parse("5966283b-4196-4d57-9211-1b68f41ec1c2")
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// Arguments for the DeleteGroup function
+type DeleteGroupArgs struct {
+ // (required)
+ GroupId *string
+}
+
+// [Preview API]
+func (client *ClientImpl) DeleteScope(ctx context.Context, args DeleteScopeArgs) error {
+ routeValues := make(map[string]string)
+ if args.ScopeId == nil {
+ return &azuredevops.ArgumentNilError{ArgumentName: "args.ScopeId"}
+ }
+ routeValues["scopeId"] = (*args.ScopeId).String()
+
+ locationId, _ := uuid.Parse("4e11e2bf-1e79-4eb5-8f34-a6337bd0de38")
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0-preview.2", routeValues, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// Arguments for the DeleteScope function
+type DeleteScopeArgs struct {
+ // (required)
+ ScopeId *uuid.UUID
+}
+
+// [Preview API]
+func (client *ClientImpl) ForceRemoveMember(ctx context.Context, args ForceRemoveMemberArgs) (*bool, error) {
+ routeValues := make(map[string]string)
+ if args.ContainerId == nil || *args.ContainerId == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.ContainerId"}
+ }
+ routeValues["containerId"] = *args.ContainerId
+ if args.MemberId == nil || *args.MemberId == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.MemberId"}
+ }
+ routeValues["memberId"] = *args.MemberId
+
+ queryParams := url.Values{}
+ if args.ForceRemove == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "forceRemove"}
+ }
+ queryParams.Add("forceRemove", strconv.FormatBool(*args.ForceRemove))
+ locationId, _ := uuid.Parse("8ba35978-138e-41f8-8963-7b1ea2c5f775")
+ resp, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue bool
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the ForceRemoveMember function
+type ForceRemoveMemberArgs struct {
+ // (required)
+ ContainerId *string
+ // (required)
+ MemberId *string
+ // (required)
+ ForceRemove *bool
+}
+
+// [Preview API]
+func (client *ClientImpl) GetDescriptorById(ctx context.Context, args GetDescriptorByIdArgs) (*string, error) {
+ routeValues := make(map[string]string)
+ if args.Id == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.Id"}
+ }
+ routeValues["id"] = (*args.Id).String()
+
+ queryParams := url.Values{}
+ if args.IsMasterId != nil {
+ queryParams.Add("isMasterId", strconv.FormatBool(*args.IsMasterId))
+ }
+ locationId, _ := uuid.Parse("a230389a-94f2-496c-839f-c929787496dd")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue string
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetDescriptorById function
+type GetDescriptorByIdArgs struct {
+ // (required)
+ Id *uuid.UUID
+ // (optional)
+ IsMasterId *bool
+}
+
+func (client *ClientImpl) GetIdentityChanges(ctx context.Context, args GetIdentityChangesArgs) (*ChangedIdentities, error) {
+ queryParams := url.Values{}
+ if args.IdentitySequenceId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "identitySequenceId"}
+ }
+ queryParams.Add("identitySequenceId", strconv.Itoa(*args.IdentitySequenceId))
+ if args.GroupSequenceId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "groupSequenceId"}
+ }
+ queryParams.Add("groupSequenceId", strconv.Itoa(*args.GroupSequenceId))
+ if args.OrganizationIdentitySequenceId != nil {
+ queryParams.Add("organizationIdentitySequenceId", strconv.Itoa(*args.OrganizationIdentitySequenceId))
+ }
+ if args.PageSize != nil {
+ queryParams.Add("pageSize", strconv.Itoa(*args.PageSize))
+ }
+ if args.ScopeId != nil {
+ queryParams.Add("scopeId", (*args.ScopeId).String())
+ }
+ locationId, _ := uuid.Parse("28010c54-d0c0-4c89-a5b0-1c9e188b9fb7")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", nil, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue ChangedIdentities
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetIdentityChanges function
+type GetIdentityChangesArgs struct {
+ // (required)
+ IdentitySequenceId *int
+ // (required)
+ GroupSequenceId *int
+ // (optional)
+ OrganizationIdentitySequenceId *int
+ // (optional)
+ PageSize *int
+ // (optional)
+ ScopeId *uuid.UUID
+}
+
+// [Preview API]
+func (client *ClientImpl) GetIdentitySnapshot(ctx context.Context, args GetIdentitySnapshotArgs) (*IdentitySnapshot, error) {
+ routeValues := make(map[string]string)
+ if args.ScopeId == nil || *args.ScopeId == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.ScopeId"}
+ }
+ routeValues["scopeId"] = *args.ScopeId
+
+ locationId, _ := uuid.Parse("d56223df-8ccd-45c9-89b4-eddf692400d7")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue IdentitySnapshot
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetIdentitySnapshot function
+type GetIdentitySnapshotArgs struct {
+ // (required)
+ ScopeId *string
+}
+
+// Read the max sequence id of all the identities.
+func (client *ClientImpl) GetMaxSequenceId(ctx context.Context, args GetMaxSequenceIdArgs) (*uint64, error) {
+ locationId, _ := uuid.Parse("e4a70778-cb2c-4e85-b7cc-3f3c7ae2d408")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", nil, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue uint64
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetMaxSequenceId function
+type GetMaxSequenceIdArgs struct {
+}
+
+// [Preview API]
+func (client *ClientImpl) GetScopeById(ctx context.Context, args GetScopeByIdArgs) (*IdentityScope, error) {
+ routeValues := make(map[string]string)
+ if args.ScopeId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.ScopeId"}
+ }
+ routeValues["scopeId"] = (*args.ScopeId).String()
+
+ locationId, _ := uuid.Parse("4e11e2bf-1e79-4eb5-8f34-a6337bd0de38")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.2", routeValues, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue IdentityScope
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetScopeById function
+type GetScopeByIdArgs struct {
+ // (required)
+ ScopeId *uuid.UUID
+}
+
+// [Preview API]
+func (client *ClientImpl) GetScopeByName(ctx context.Context, args GetScopeByNameArgs) (*IdentityScope, error) {
+ queryParams := url.Values{}
+ if args.ScopeName == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "scopeName"}
+ }
+ queryParams.Add("scopeName", *args.ScopeName)
+ locationId, _ := uuid.Parse("4e11e2bf-1e79-4eb5-8f34-a6337bd0de38")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.2", nil, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue IdentityScope
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetScopeByName function
+type GetScopeByNameArgs struct {
+ // (required)
+ ScopeName *string
+}
+
+// Read identity of the home tenant request user.
+func (client *ClientImpl) GetSelf(ctx context.Context, args GetSelfArgs) (*IdentitySelf, error) {
+ locationId, _ := uuid.Parse("4bb02b5b-c120-4be2-b68e-21f7c50a4b82")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", nil, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue IdentitySelf
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetSelf function
+type GetSelfArgs struct {
+}
+
+// [Preview API]
+func (client *ClientImpl) GetSignedInToken(ctx context.Context, args GetSignedInTokenArgs) (*delegatedauthorization.AccessTokenResult, error) {
+ locationId, _ := uuid.Parse("6074ff18-aaad-4abb-a41e-5c75f6178057")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", nil, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue delegatedauthorization.AccessTokenResult
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetSignedInToken function
+type GetSignedInTokenArgs struct {
+}
+
+// [Preview API]
+func (client *ClientImpl) GetSignoutToken(ctx context.Context, args GetSignoutTokenArgs) (*delegatedauthorization.AccessTokenResult, error) {
+ locationId, _ := uuid.Parse("be39e83c-7529-45e9-9c67-0410885880da")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", nil, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue delegatedauthorization.AccessTokenResult
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetSignoutToken function
+type GetSignoutTokenArgs struct {
+}
+
+// [Preview API]
+func (client *ClientImpl) GetTenant(ctx context.Context, args GetTenantArgs) (*TenantInfo, error) {
+ routeValues := make(map[string]string)
+ if args.TenantId == nil || *args.TenantId == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.TenantId"}
+ }
+ routeValues["tenantId"] = *args.TenantId
+
+ locationId, _ := uuid.Parse("5f0a1723-2e2c-4c31-8cae-002d01bdd592")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue TenantInfo
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetTenant function
+type GetTenantArgs struct {
+ // (required)
+ TenantId *string
+}
+
+func (client *ClientImpl) GetUserIdentityIdsByDomainId(ctx context.Context, args GetUserIdentityIdsByDomainIdArgs) (*[]uuid.UUID, error) {
+ queryParams := url.Values{}
+ if args.DomainId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "domainId"}
+ }
+ queryParams.Add("domainId", (*args.DomainId).String())
+ locationId, _ := uuid.Parse("28010c54-d0c0-4c89-a5b0-1c9e188b9fb7")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", nil, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []uuid.UUID
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetUserIdentityIdsByDomainId function
+type GetUserIdentityIdsByDomainIdArgs struct {
+ // (required)
+ DomainId *uuid.UUID
+}
+
+func (client *ClientImpl) ListGroups(ctx context.Context, args ListGroupsArgs) (*[]Identity, error) {
+ queryParams := url.Values{}
+ if args.ScopeIds != nil {
+ queryParams.Add("scopeIds", *args.ScopeIds)
+ }
+ if args.Recurse != nil {
+ queryParams.Add("recurse", strconv.FormatBool(*args.Recurse))
+ }
+ if args.Deleted != nil {
+ queryParams.Add("deleted", strconv.FormatBool(*args.Deleted))
+ }
+ if args.Properties != nil {
+ queryParams.Add("properties", *args.Properties)
+ }
+ locationId, _ := uuid.Parse("5966283b-4196-4d57-9211-1b68f41ec1c2")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", nil, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []Identity
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the ListGroups function
+type ListGroupsArgs struct {
+ // (optional)
+ ScopeIds *string
+ // (optional)
+ Recurse *bool
+ // (optional)
+ Deleted *bool
+ // (optional)
+ Properties *string
+}
+
+// Resolve legacy identity information for use with older APIs such as the Security APIs
+func (client *ClientImpl) ReadIdentities(ctx context.Context, args ReadIdentitiesArgs) (*[]Identity, error) {
+ queryParams := url.Values{}
+ if args.Descriptors != nil {
+ queryParams.Add("descriptors", *args.Descriptors)
+ }
+ if args.IdentityIds != nil {
+ queryParams.Add("identityIds", *args.IdentityIds)
+ }
+ if args.SubjectDescriptors != nil {
+ queryParams.Add("subjectDescriptors", *args.SubjectDescriptors)
+ }
+ if args.SocialDescriptors != nil {
+ queryParams.Add("socialDescriptors", *args.SocialDescriptors)
+ }
+ if args.SearchFilter != nil {
+ queryParams.Add("searchFilter", *args.SearchFilter)
+ }
+ if args.FilterValue != nil {
+ queryParams.Add("filterValue", *args.FilterValue)
+ }
+ if args.QueryMembership != nil {
+ queryParams.Add("queryMembership", string(*args.QueryMembership))
+ }
+ if args.Properties != nil {
+ queryParams.Add("properties", *args.Properties)
+ }
+ if args.IncludeRestrictedVisibility != nil {
+ queryParams.Add("includeRestrictedVisibility", strconv.FormatBool(*args.IncludeRestrictedVisibility))
+ }
+ if args.Options != nil {
+ queryParams.Add("options", string(*args.Options))
+ }
+ locationId, _ := uuid.Parse("28010c54-d0c0-4c89-a5b0-1c9e188b9fb7")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", nil, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []Identity
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the ReadIdentities function
+type ReadIdentitiesArgs struct {
+ // (optional) A comma separated list of identity descriptors to resolve
+ Descriptors *string
+ // (optional) A comma seperated list of storage keys to resolve
+ IdentityIds *string
+ // (optional) A comma seperated list of subject descriptors to resolve
+ SubjectDescriptors *string
+ // (optional)
+ SocialDescriptors *string
+ // (optional) The type of search to perform. Values can be AccountName (domain\alias), DisplayName, MailAddress, General (display name, account name, or unique name), or LocalGroupName (only search Azure Devops groups).
+ SearchFilter *string
+ // (optional) The search value, as specified by the searchFilter.
+ FilterValue *string
+ // (optional) The membership information to include with the identities. Values can be None for no membership data or Direct to include the groups that the identity is a member of and the identities that are a member of this identity (groups only)
+ QueryMembership *QueryMembership
+ // (optional)
+ Properties *string
+ // (optional)
+ IncludeRestrictedVisibility *bool
+ // (optional)
+ Options *ReadIdentitiesOptions
+}
+
+func (client *ClientImpl) ReadIdentitiesByScope(ctx context.Context, args ReadIdentitiesByScopeArgs) (*[]Identity, error) {
+ queryParams := url.Values{}
+ if args.ScopeId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "scopeId"}
+ }
+ queryParams.Add("scopeId", (*args.ScopeId).String())
+ if args.QueryMembership != nil {
+ queryParams.Add("queryMembership", string(*args.QueryMembership))
+ }
+ if args.Properties != nil {
+ queryParams.Add("properties", *args.Properties)
+ }
+ locationId, _ := uuid.Parse("28010c54-d0c0-4c89-a5b0-1c9e188b9fb7")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", nil, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []Identity
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the ReadIdentitiesByScope function
+type ReadIdentitiesByScopeArgs struct {
+ // (required)
+ ScopeId *uuid.UUID
+ // (optional)
+ QueryMembership *QueryMembership
+ // (optional)
+ Properties *string
+}
+
+func (client *ClientImpl) ReadIdentity(ctx context.Context, args ReadIdentityArgs) (*Identity, error) {
+ routeValues := make(map[string]string)
+ if args.IdentityId == nil || *args.IdentityId == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.IdentityId"}
+ }
+ routeValues["identityId"] = *args.IdentityId
+
+ queryParams := url.Values{}
+ if args.QueryMembership != nil {
+ queryParams.Add("queryMembership", string(*args.QueryMembership))
+ }
+ if args.Properties != nil {
+ queryParams.Add("properties", *args.Properties)
+ }
+ locationId, _ := uuid.Parse("28010c54-d0c0-4c89-a5b0-1c9e188b9fb7")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue Identity
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the ReadIdentity function
+type ReadIdentityArgs struct {
+ // (required)
+ IdentityId *string
+ // (optional)
+ QueryMembership *QueryMembership
+ // (optional)
+ Properties *string
+}
+
+// [Preview API]
+func (client *ClientImpl) ReadIdentityBatch(ctx context.Context, args ReadIdentityBatchArgs) (*[]Identity, error) {
+ if args.BatchInfo == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.BatchInfo"}
+ }
+ body, marshalErr := json.Marshal(*args.BatchInfo)
+ if marshalErr != nil {
+ return nil, marshalErr
+ }
+ locationId, _ := uuid.Parse("299e50df-fe45-4d3a-8b5b-a5836fac74dc")
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.1", nil, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []Identity
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the ReadIdentityBatch function
+type ReadIdentityBatchArgs struct {
+ // (required)
+ BatchInfo *IdentityBatchInfo
+}
+
+// [Preview API]
+func (client *ClientImpl) ReadMember(ctx context.Context, args ReadMemberArgs) (*string, error) {
+ routeValues := make(map[string]string)
+ if args.ContainerId == nil || *args.ContainerId == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.ContainerId"}
+ }
+ routeValues["containerId"] = *args.ContainerId
+ if args.MemberId == nil || *args.MemberId == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.MemberId"}
+ }
+ routeValues["memberId"] = *args.MemberId
+
+ queryParams := url.Values{}
+ if args.QueryMembership != nil {
+ queryParams.Add("queryMembership", string(*args.QueryMembership))
+ }
+ locationId, _ := uuid.Parse("8ba35978-138e-41f8-8963-7b1ea2c5f775")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue string
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the ReadMember function
+type ReadMemberArgs struct {
+ // (required)
+ ContainerId *string
+ // (required)
+ MemberId *string
+ // (optional)
+ QueryMembership *QueryMembership
+}
+
+// [Preview API]
+func (client *ClientImpl) ReadMemberOf(ctx context.Context, args ReadMemberOfArgs) (*string, error) {
+ routeValues := make(map[string]string)
+ if args.MemberId == nil || *args.MemberId == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.MemberId"}
+ }
+ routeValues["memberId"] = *args.MemberId
+ if args.ContainerId == nil || *args.ContainerId == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.ContainerId"}
+ }
+ routeValues["containerId"] = *args.ContainerId
+
+ queryParams := url.Values{}
+ if args.QueryMembership != nil {
+ queryParams.Add("queryMembership", string(*args.QueryMembership))
+ }
+ locationId, _ := uuid.Parse("22865b02-9e4a-479e-9e18-e35b8803b8a0")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue string
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the ReadMemberOf function
+type ReadMemberOfArgs struct {
+ // (required)
+ MemberId *string
+ // (required)
+ ContainerId *string
+ // (optional)
+ QueryMembership *QueryMembership
+}
+
+// [Preview API]
+func (client *ClientImpl) ReadMembers(ctx context.Context, args ReadMembersArgs) (*[]string, error) {
+ routeValues := make(map[string]string)
+ if args.ContainerId == nil || *args.ContainerId == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.ContainerId"}
+ }
+ routeValues["containerId"] = *args.ContainerId
+
+ queryParams := url.Values{}
+ if args.QueryMembership != nil {
+ queryParams.Add("queryMembership", string(*args.QueryMembership))
+ }
+ locationId, _ := uuid.Parse("8ba35978-138e-41f8-8963-7b1ea2c5f775")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []string
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the ReadMembers function
+type ReadMembersArgs struct {
+ // (required)
+ ContainerId *string
+ // (optional)
+ QueryMembership *QueryMembership
+}
+
+// [Preview API]
+func (client *ClientImpl) ReadMembersOf(ctx context.Context, args ReadMembersOfArgs) (*[]string, error) {
+ routeValues := make(map[string]string)
+ if args.MemberId == nil || *args.MemberId == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.MemberId"}
+ }
+ routeValues["memberId"] = *args.MemberId
+
+ queryParams := url.Values{}
+ if args.QueryMembership != nil {
+ queryParams.Add("queryMembership", string(*args.QueryMembership))
+ }
+ locationId, _ := uuid.Parse("22865b02-9e4a-479e-9e18-e35b8803b8a0")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []string
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the ReadMembersOf function
+type ReadMembersOfArgs struct {
+ // (required)
+ MemberId *string
+ // (optional)
+ QueryMembership *QueryMembership
+}
+
+// [Preview API]
+func (client *ClientImpl) RemoveMember(ctx context.Context, args RemoveMemberArgs) (*bool, error) {
+ routeValues := make(map[string]string)
+ if args.ContainerId == nil || *args.ContainerId == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.ContainerId"}
+ }
+ routeValues["containerId"] = *args.ContainerId
+ if args.MemberId == nil || *args.MemberId == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.MemberId"}
+ }
+ routeValues["memberId"] = *args.MemberId
+
+ locationId, _ := uuid.Parse("8ba35978-138e-41f8-8963-7b1ea2c5f775")
+ resp, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue bool
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the RemoveMember function
+type RemoveMemberArgs struct {
+ // (required)
+ ContainerId *string
+ // (required)
+ MemberId *string
+}
+
+func (client *ClientImpl) UpdateIdentities(ctx context.Context, args UpdateIdentitiesArgs) (*[]IdentityUpdateData, error) {
+ if args.Identities == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.Identities"}
+ }
+ queryParams := url.Values{}
+ if args.AllowMetaDataUpdate != nil {
+ queryParams.Add("allowMetaDataUpdate", strconv.FormatBool(*args.AllowMetaDataUpdate))
+ }
+ body, marshalErr := json.Marshal(*args.Identities)
+ if marshalErr != nil {
+ return nil, marshalErr
+ }
+ locationId, _ := uuid.Parse("28010c54-d0c0-4c89-a5b0-1c9e188b9fb7")
+ resp, err := client.Client.Send(ctx, http.MethodPut, locationId, "6.0", nil, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []IdentityUpdateData
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the UpdateIdentities function
+type UpdateIdentitiesArgs struct {
+ // (required)
+ Identities *azuredevops.VssJsonCollectionWrapper
+ // (optional)
+ AllowMetaDataUpdate *bool
+}
+
+func (client *ClientImpl) UpdateIdentity(ctx context.Context, args UpdateIdentityArgs) error {
+ if args.Identity == nil {
+ return &azuredevops.ArgumentNilError{ArgumentName: "args.Identity"}
+ }
+ routeValues := make(map[string]string)
+ if args.IdentityId == nil {
+ return &azuredevops.ArgumentNilError{ArgumentName: "args.IdentityId"}
+ }
+ routeValues["identityId"] = (*args.IdentityId).String()
+
+ body, marshalErr := json.Marshal(*args.Identity)
+ if marshalErr != nil {
+ return marshalErr
+ }
+ locationId, _ := uuid.Parse("28010c54-d0c0-4c89-a5b0-1c9e188b9fb7")
+ _, err := client.Client.Send(ctx, http.MethodPut, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// Arguments for the UpdateIdentity function
+type UpdateIdentityArgs struct {
+ // (required)
+ Identity *Identity
+ // (required)
+ IdentityId *uuid.UUID
+}
+
+// [Preview API]
+func (client *ClientImpl) UpdateScope(ctx context.Context, args UpdateScopeArgs) error {
+ if args.PatchDocument == nil {
+ return &azuredevops.ArgumentNilError{ArgumentName: "args.PatchDocument"}
+ }
+ routeValues := make(map[string]string)
+ if args.ScopeId == nil {
+ return &azuredevops.ArgumentNilError{ArgumentName: "args.ScopeId"}
+ }
+ routeValues["scopeId"] = (*args.ScopeId).String()
+
+ body, marshalErr := json.Marshal(*args.PatchDocument)
+ if marshalErr != nil {
+ return marshalErr
+ }
+ locationId, _ := uuid.Parse("4e11e2bf-1e79-4eb5-8f34-a6337bd0de38")
+ _, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0-preview.2", routeValues, nil, bytes.NewReader(body), "application/json-patch+json", "application/json", nil)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// Arguments for the UpdateScope function
+type UpdateScopeArgs struct {
+ // (required)
+ PatchDocument *[]webapi.JsonPatchOperation
+ // (required)
+ ScopeId *uuid.UUID
+}
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/identity/models.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/identity/models.go
new file mode 100644
index 000000000..ecf00c39f
--- /dev/null
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/identity/models.go
@@ -0,0 +1,253 @@
+// --------------------------------------------------------------------------------------------
+// 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 identity
+
+import (
+ "github.com/google/uuid"
+)
+
+// Container class for changed identities
+type ChangedIdentities struct {
+ // Changed Identities
+ Identities *[]Identity `json:"identities,omitempty"`
+ // More data available, set to true if pagesize is specified.
+ MoreData *bool `json:"moreData,omitempty"`
+ // Last Identity SequenceId
+ SequenceContext *ChangedIdentitiesContext `json:"sequenceContext,omitempty"`
+}
+
+// Context class for changed identities
+type ChangedIdentitiesContext struct {
+ // Last Group SequenceId
+ GroupSequenceId *int `json:"groupSequenceId,omitempty"`
+ // Last Identity SequenceId
+ IdentitySequenceId *int `json:"identitySequenceId,omitempty"`
+ // Last Group OrganizationIdentitySequenceId
+ OrganizationIdentitySequenceId *int `json:"organizationIdentitySequenceId,omitempty"`
+ // Page size
+ PageSize *int `json:"pageSize,omitempty"`
+}
+
+type CreateScopeInfo struct {
+ AdminGroupDescription *string `json:"adminGroupDescription,omitempty"`
+ AdminGroupName *string `json:"adminGroupName,omitempty"`
+ CreatorId *uuid.UUID `json:"creatorId,omitempty"`
+ ParentScopeId *uuid.UUID `json:"parentScopeId,omitempty"`
+ ScopeName *string `json:"scopeName,omitempty"`
+ ScopeType *GroupScopeType `json:"scopeType,omitempty"`
+}
+
+type FrameworkIdentityInfo struct {
+ DisplayName *string `json:"displayName,omitempty"`
+ Identifier *string `json:"identifier,omitempty"`
+ IdentityType *FrameworkIdentityType `json:"identityType,omitempty"`
+ Role *string `json:"role,omitempty"`
+}
+
+type FrameworkIdentityType string
+
+type frameworkIdentityTypeValuesType struct {
+ None FrameworkIdentityType
+ ServiceIdentity FrameworkIdentityType
+ AggregateIdentity FrameworkIdentityType
+ ImportedIdentity FrameworkIdentityType
+}
+
+var FrameworkIdentityTypeValues = frameworkIdentityTypeValuesType{
+ None: "none",
+ ServiceIdentity: "serviceIdentity",
+ AggregateIdentity: "aggregateIdentity",
+ ImportedIdentity: "importedIdentity",
+}
+
+type GroupMembership struct {
+ Active *bool `json:"active,omitempty"`
+ Descriptor *string `json:"descriptor,omitempty"`
+ Id *uuid.UUID `json:"id,omitempty"`
+ QueriedId *uuid.UUID `json:"queriedId,omitempty"`
+}
+
+type GroupScopeType string
+
+type groupScopeTypeValuesType struct {
+ Generic GroupScopeType
+ ServiceHost GroupScopeType
+ TeamProject GroupScopeType
+}
+
+var GroupScopeTypeValues = groupScopeTypeValuesType{
+ Generic: "generic",
+ ServiceHost: "serviceHost",
+ TeamProject: "teamProject",
+}
+
+type Identity struct {
+ // The custom display name for the identity (if any). Setting this property to an empty string will clear the existing custom display name. Setting this property to null will not affect the existing persisted value (since null values do not get sent over the wire or to the database)
+ CustomDisplayName *string `json:"customDisplayName,omitempty"`
+ Descriptor *string `json:"descriptor,omitempty"`
+ // Identity Identifier. Also called Storage Key, or VSID
+ Id *uuid.UUID `json:"id,omitempty"`
+ // True if the identity has a membership in any Azure Devops group in the organization.
+ IsActive *bool `json:"isActive,omitempty"`
+ // True if the identity is a group.
+ IsContainer *bool `json:"isContainer,omitempty"`
+ MasterId *uuid.UUID `json:"masterId,omitempty"`
+ // Id of the members of the identity (groups only).
+ MemberIds *[]uuid.UUID `json:"memberIds,omitempty"`
+ MemberOf *[]string `json:"memberOf,omitempty"`
+ Members *[]string `json:"members,omitempty"`
+ MetaTypeId *int `json:"metaTypeId,omitempty"`
+ Properties interface{} `json:"properties,omitempty"`
+ // The display name for the identity as specified by the source identity provider.
+ ProviderDisplayName *string `json:"providerDisplayName,omitempty"`
+ ResourceVersion *int `json:"resourceVersion,omitempty"`
+ SocialDescriptor *string `json:"socialDescriptor,omitempty"`
+ // Subject descriptor of a Graph entity.
+ SubjectDescriptor *string `json:"subjectDescriptor,omitempty"`
+ UniqueUserId *int `json:"uniqueUserId,omitempty"`
+}
+
+// Base Identity class to allow "trimmed" identity class in the GetConnectionData API Makes sure that on-the-wire representations of the derived classes are compatible with each other (e.g. Server responds with PublicIdentity object while client deserializes it as Identity object) Derived classes should not have additional [DataMember] properties
+type IdentityBase struct {
+ // The custom display name for the identity (if any). Setting this property to an empty string will clear the existing custom display name. Setting this property to null will not affect the existing persisted value (since null values do not get sent over the wire or to the database)
+ CustomDisplayName *string `json:"customDisplayName,omitempty"`
+ Descriptor *string `json:"descriptor,omitempty"`
+ // Identity Identifier. Also called Storage Key, or VSID
+ Id *uuid.UUID `json:"id,omitempty"`
+ // True if the identity has a membership in any Azure Devops group in the organization.
+ IsActive *bool `json:"isActive,omitempty"`
+ // True if the identity is a group.
+ IsContainer *bool `json:"isContainer,omitempty"`
+ MasterId *uuid.UUID `json:"masterId,omitempty"`
+ // Id of the members of the identity (groups only).
+ MemberIds *[]uuid.UUID `json:"memberIds,omitempty"`
+ MemberOf *[]string `json:"memberOf,omitempty"`
+ Members *[]string `json:"members,omitempty"`
+ MetaTypeId *int `json:"metaTypeId,omitempty"`
+ Properties interface{} `json:"properties,omitempty"`
+ // The display name for the identity as specified by the source identity provider.
+ ProviderDisplayName *string `json:"providerDisplayName,omitempty"`
+ ResourceVersion *int `json:"resourceVersion,omitempty"`
+ SocialDescriptor *string `json:"socialDescriptor,omitempty"`
+ // Subject descriptor of a Graph entity.
+ SubjectDescriptor *string `json:"subjectDescriptor,omitempty"`
+ UniqueUserId *int `json:"uniqueUserId,omitempty"`
+}
+
+type IdentityBatchInfo struct {
+ Descriptors *[]string `json:"descriptors,omitempty"`
+ IdentityIds *[]uuid.UUID `json:"identityIds,omitempty"`
+ IncludeRestrictedVisibility *bool `json:"includeRestrictedVisibility,omitempty"`
+ PropertyNames *[]string `json:"propertyNames,omitempty"`
+ QueryMembership *QueryMembership `json:"queryMembership,omitempty"`
+ SocialDescriptors *[]string `json:"socialDescriptors,omitempty"`
+ SubjectDescriptors *[]string `json:"subjectDescriptors,omitempty"`
+}
+
+type IdentityRightsTransferData struct {
+ UserPrincipalNameMappings *map[string]string `json:"userPrincipalNameMappings,omitempty"`
+}
+
+type IdentityScope struct {
+ Administrators *string `json:"administrators,omitempty"`
+ Id *uuid.UUID `json:"id,omitempty"`
+ IsActive *bool `json:"isActive,omitempty"`
+ IsGlobal *bool `json:"isGlobal,omitempty"`
+ LocalScopeId *uuid.UUID `json:"localScopeId,omitempty"`
+ Name *string `json:"name,omitempty"`
+ ParentId *uuid.UUID `json:"parentId,omitempty"`
+ ScopeType *GroupScopeType `json:"scopeType,omitempty"`
+ SecuringHostId *uuid.UUID `json:"securingHostId,omitempty"`
+ SubjectDescriptor *string `json:"subjectDescriptor,omitempty"`
+}
+
+// Identity information.
+type IdentitySelf struct {
+ // The UserPrincipalName (UPN) of the account. This value comes from the source provider.
+ AccountName *string `json:"accountName,omitempty"`
+ // The display name. For AAD accounts with multiple tenants this is the display name of the profile in the home tenant.
+ DisplayName *string `json:"displayName,omitempty"`
+ // This represents the name of the container of origin. For AAD accounts this is the tenantID of the home tenant. For MSA accounts this is the string "Windows Live ID".
+ Domain *string `json:"domain,omitempty"`
+ // This is the VSID of the home tenant profile. If the profile is signed into the home tenant or if the profile has no tenants then this Id is the same as the Id returned by the profile/profiles/me endpoint. Going forward it is recommended that you use the combined values of Origin, OriginId and Domain to uniquely identify a user rather than this Id.
+ Id *uuid.UUID `json:"id,omitempty"`
+ // The type of source provider for the origin identifier. For MSA accounts this is "msa". For AAD accounts this is "aad".
+ Origin *string `json:"origin,omitempty"`
+ // The unique identifier from the system of origin. If there are multiple tenants this is the unique identifier of the account in the home tenant. (For MSA this is the PUID in hex notation, for AAD this is the object id.)
+ OriginId *string `json:"originId,omitempty"`
+ // For AAD accounts this is all of the tenants that this account is a member of.
+ Tenants *[]TenantInfo `json:"tenants,omitempty"`
+}
+
+type IdentitySnapshot struct {
+ Groups *[]Identity `json:"groups,omitempty"`
+ IdentityIds *[]uuid.UUID `json:"identityIds,omitempty"`
+ Memberships *[]GroupMembership `json:"memberships,omitempty"`
+ ScopeId *uuid.UUID `json:"scopeId,omitempty"`
+ Scopes *[]IdentityScope `json:"scopes,omitempty"`
+}
+
+type IdentityUpdateData struct {
+ Id *uuid.UUID `json:"id,omitempty"`
+ Index *int `json:"index,omitempty"`
+ Updated *bool `json:"updated,omitempty"`
+}
+
+type PagedIdentities struct {
+ ContinuationToken *[]string `json:"continuationToken,omitempty"`
+ Identities *[]Identity `json:"identities,omitempty"`
+}
+
+type QueryMembership string
+
+type queryMembershipValuesType struct {
+ None QueryMembership
+ Direct QueryMembership
+ Expanded QueryMembership
+ ExpandedUp QueryMembership
+ ExpandedDown QueryMembership
+}
+
+var QueryMembershipValues = queryMembershipValuesType{
+ // Query will not return any membership data
+ None: "none",
+ // Query will return only direct membership data
+ Direct: "direct",
+ // Query will return expanded membership data
+ Expanded: "expanded",
+ // Query will return expanded up membership data (parents only)
+ ExpandedUp: "expandedUp",
+ // Query will return expanded down membership data (children only)
+ ExpandedDown: "expandedDown",
+}
+
+// [Flags]
+type ReadIdentitiesOptions string
+
+type readIdentitiesOptionsValuesType struct {
+ None ReadIdentitiesOptions
+ FilterIllegalMemberships ReadIdentitiesOptions
+}
+
+var ReadIdentitiesOptionsValues = readIdentitiesOptionsValuesType{
+ None: "none",
+ FilterIllegalMemberships: "filterIllegalMemberships",
+}
+
+type SwapIdentityInfo struct {
+ Id1 *uuid.UUID `json:"id1,omitempty"`
+ Id2 *uuid.UUID `json:"id2,omitempty"`
+}
+
+type TenantInfo struct {
+ HomeTenant *bool `json:"homeTenant,omitempty"`
+ TenantId *uuid.UUID `json:"tenantId,omitempty"`
+ TenantName *string `json:"tenantName,omitempty"`
+ VerifiedDomains *[]string `json:"verifiedDomains,omitempty"`
+}
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/licensing/models.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/licensing/models.go
similarity index 97%
rename from vendor/github.com/microsoft/azure-devops-go-api/azuredevops/licensing/models.go
rename to vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/licensing/models.go
index f5e24670a..9cdcc9955 100644
--- a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/licensing/models.go
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/licensing/models.go
@@ -10,10 +10,10 @@ package licensing
import (
"github.com/google/uuid"
- "github.com/microsoft/azure-devops-go-api/azuredevops"
- "github.com/microsoft/azure-devops-go-api/azuredevops/accounts"
- "github.com/microsoft/azure-devops-go-api/azuredevops/commerce"
- "github.com/microsoft/azure-devops-go-api/azuredevops/webapi"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/accounts"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/commerce"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/webapi"
)
// License assigned to a user
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/licensingrule/models.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/licensingrule/models.go
similarity index 93%
rename from vendor/github.com/microsoft/azure-devops-go-api/azuredevops/licensingrule/models.go
rename to vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/licensingrule/models.go
index e3b7c383f..c6bbab7ab 100644
--- a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/licensingrule/models.go
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/licensingrule/models.go
@@ -9,9 +9,9 @@
package licensingrule
import (
- "github.com/microsoft/azure-devops-go-api/azuredevops"
- "github.com/microsoft/azure-devops-go-api/azuredevops/licensing"
- "github.com/microsoft/azure-devops-go-api/azuredevops/operations"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/licensing"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/operations"
)
type ApplicationStatus struct {
@@ -102,6 +102,8 @@ type LicenseApplicationStatus struct {
type LicenseRule struct {
// The last time the rule was executed (regardless of whether any changes were made)
LastExecuted *azuredevops.Time `json:"lastExecuted,omitempty"`
+ // Lasted updated timestamp of the licensing rule
+ LastUpdated *azuredevops.Time `json:"lastUpdated,omitempty"`
// License
License *licensing.License `json:"license,omitempty"`
// Status of the group rule (applied, missing licenses, etc)
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/memberentitlementmanagement/client.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/memberentitlementmanagement/client.go
similarity index 84%
rename from vendor/github.com/microsoft/azure-devops-go-api/azuredevops/memberentitlementmanagement/client.go
rename to vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/memberentitlementmanagement/client.go
index b57b176c3..56599c85b 100644
--- a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/memberentitlementmanagement/client.go
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/memberentitlementmanagement/client.go
@@ -13,9 +13,9 @@ import (
"context"
"encoding/json"
"github.com/google/uuid"
- "github.com/microsoft/azure-devops-go-api/azuredevops"
- "github.com/microsoft/azure-devops-go-api/azuredevops/licensingrule"
- "github.com/microsoft/azure-devops-go-api/azuredevops/webapi"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/licensingrule"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/webapi"
"net/http"
"net/url"
"strconv"
@@ -42,12 +42,12 @@ type Client interface {
GetGroupMembers(context.Context, GetGroupMembersArgs) (*PagedGraphMemberList, error)
// [Preview API] Get User Entitlement for a user.
GetUserEntitlement(context.Context, GetUserEntitlementArgs) (*UserEntitlement, error)
- // [Preview API] Get a paged set of user entitlements matching the filter criteria. If no filter is is passed, a page from all the account users is returned.
- GetUserEntitlements(context.Context, GetUserEntitlementsArgs) (*PagedGraphMemberList, error)
// [Preview API] Get summary of Licenses, Extension, Projects, Groups and their assignments in the collection.
GetUsersSummary(context.Context, GetUsersSummaryArgs) (*UsersSummary, error)
// [Preview API] Remove a member from a Group.
RemoveMemberFromGroup(context.Context, RemoveMemberFromGroupArgs) error
+ // [Preview API] Get a paged set of user entitlements matching the filter and sort criteria built with properties that match the select input.
+ SearchUserEntitlements(context.Context, SearchUserEntitlementsArgs) (*PagedGraphMemberList, error)
// [Preview API] Update entitlements (License Rule, Extensions Rule, Project memberships etc.) for a group.
UpdateGroupEntitlement(context.Context, UpdateGroupEntitlementArgs) (*GroupEntitlementOperationReference, error)
// [Preview API] Edit the entitlements (License, Extensions, Projects, Teams etc) for a user.
@@ -84,7 +84,7 @@ func (client *ClientImpl) AddGroupEntitlement(ctx context.Context, args AddGroup
return nil, marshalErr
}
locationId, _ := uuid.Parse("2280bffa-58a2-49da-822e-0764a1bb44f7")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.1", nil, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.1", nil, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -115,7 +115,7 @@ func (client *ClientImpl) AddMemberToGroup(ctx context.Context, args AddMemberTo
routeValues["memberId"] = (*args.MemberId).String()
locationId, _ := uuid.Parse("45a36e53-5286-4518-aa72-2d29f7acc5d8")
- _, err := client.Client.Send(ctx, http.MethodPut, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodPut, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return err
}
@@ -141,7 +141,7 @@ func (client *ClientImpl) AddUserEntitlement(ctx context.Context, args AddUserEn
return nil, marshalErr
}
locationId, _ := uuid.Parse("387f832c-dbf2-4643-88e9-c1aa94dbb737")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.2", nil, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.3", nil, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -173,7 +173,7 @@ func (client *ClientImpl) DeleteGroupEntitlement(ctx context.Context, args Delet
queryParams.Add("removeGroupMembership", strconv.FormatBool(*args.RemoveGroupMembership))
}
locationId, _ := uuid.Parse("2280bffa-58a2-49da-822e-0764a1bb44f7")
- resp, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -202,7 +202,7 @@ func (client *ClientImpl) DeleteUserEntitlement(ctx context.Context, args Delete
routeValues["userId"] = (*args.UserId).String()
locationId, _ := uuid.Parse("8480c6eb-ce60-47e9-88df-eca3c801638b")
- _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1-preview.2", routeValues, nil, nil, "", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0-preview.3", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return err
}
@@ -225,7 +225,7 @@ func (client *ClientImpl) GetGroupEntitlement(ctx context.Context, args GetGroup
routeValues["groupId"] = (*args.GroupId).String()
locationId, _ := uuid.Parse("2280bffa-58a2-49da-822e-0764a1bb44f7")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -243,8 +243,8 @@ type GetGroupEntitlementArgs struct {
// [Preview API] Get the group entitlements for an account.
func (client *ClientImpl) GetGroupEntitlements(ctx context.Context, args GetGroupEntitlementsArgs) (*[]GroupEntitlement, error) {
- locationId, _ := uuid.Parse("2280bffa-58a2-49da-822e-0764a1bb44f7")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", nil, nil, nil, "", "application/json", nil)
+ locationId, _ := uuid.Parse("9bce1f43-2629-419f-8f6c-7503be58a4f3")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", nil, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -274,7 +274,7 @@ func (client *ClientImpl) GetGroupMembers(ctx context.Context, args GetGroupMemb
queryParams.Add("pagingToken", *args.PagingToken)
}
locationId, _ := uuid.Parse("45a36e53-5286-4518-aa72-2d29f7acc5d8")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -303,7 +303,7 @@ func (client *ClientImpl) GetUserEntitlement(ctx context.Context, args GetUserEn
routeValues["userId"] = (*args.UserId).String()
locationId, _ := uuid.Parse("8480c6eb-ce60-47e9-88df-eca3c801638b")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.2", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.3", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -319,44 +319,6 @@ type GetUserEntitlementArgs struct {
UserId *uuid.UUID
}
-// [Preview API] Get a paged set of user entitlements matching the filter criteria. If no filter is is passed, a page from all the account users is returned.
-func (client *ClientImpl) GetUserEntitlements(ctx context.Context, args GetUserEntitlementsArgs) (*PagedGraphMemberList, error) {
- queryParams := url.Values{}
- if args.Top != nil {
- queryParams.Add("top", strconv.Itoa(*args.Top))
- }
- if args.Skip != nil {
- queryParams.Add("skip", strconv.Itoa(*args.Skip))
- }
- if args.Filter != nil {
- queryParams.Add("filter", *args.Filter)
- }
- if args.SortOption != nil {
- queryParams.Add("sortOption", *args.SortOption)
- }
- locationId, _ := uuid.Parse("387f832c-dbf2-4643-88e9-c1aa94dbb737")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.2", nil, queryParams, nil, "", "application/json", nil)
- if err != nil {
- return nil, err
- }
-
- var responseValue PagedGraphMemberList
- err = client.Client.UnmarshalBody(resp, &responseValue)
- return &responseValue, err
-}
-
-// Arguments for the GetUserEntitlements function
-type GetUserEntitlementsArgs struct {
- // (optional) Maximum number of the user entitlements to return. Max value is 10000. Default value is 100
- Top *int
- // (optional) Offset: Number of records to skip. Default value is 0
- Skip *int
- // (optional) Comma (",") separated list of properties and their values to filter on. Currently, the API only supports filtering by ExtensionId. An example parameter would be filter=extensionId eq search.
- Filter *string
- // (optional) PropertyName and Order (separated by a space ( )) to sort on (e.g. LastAccessDate Desc)
- SortOption *string
-}
-
// [Preview API] Get summary of Licenses, Extension, Projects, Groups and their assignments in the collection.
func (client *ClientImpl) GetUsersSummary(ctx context.Context, args GetUsersSummaryArgs) (*UsersSummary, error) {
queryParams := url.Values{}
@@ -364,7 +326,7 @@ func (client *ClientImpl) GetUsersSummary(ctx context.Context, args GetUsersSumm
queryParams.Add("select", *args.Select)
}
locationId, _ := uuid.Parse("5ae55b13-c9dd-49d1-957e-6e76c152e3d9")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", nil, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", nil, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -376,7 +338,7 @@ func (client *ClientImpl) GetUsersSummary(ctx context.Context, args GetUsersSumm
// Arguments for the GetUsersSummary function
type GetUsersSummaryArgs struct {
- // (optional) Comma (",") separated list of properties to select. Supported property names are {AccessLevels, Licenses, Extensions, Projects, Groups}.
+ // (optional) Comma (",") separated list of properties to select. Supported property names are {AccessLevels, Licenses, Projects, Groups}.
Select *string
}
@@ -393,7 +355,7 @@ func (client *ClientImpl) RemoveMemberFromGroup(ctx context.Context, args Remove
routeValues["memberId"] = (*args.MemberId).String()
locationId, _ := uuid.Parse("45a36e53-5286-4518-aa72-2d29f7acc5d8")
- _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return err
}
@@ -409,6 +371,44 @@ type RemoveMemberFromGroupArgs struct {
MemberId *uuid.UUID
}
+// [Preview API] Get a paged set of user entitlements matching the filter and sort criteria built with properties that match the select input.
+func (client *ClientImpl) SearchUserEntitlements(ctx context.Context, args SearchUserEntitlementsArgs) (*PagedGraphMemberList, error) {
+ queryParams := url.Values{}
+ if args.ContinuationToken != nil {
+ queryParams.Add("continuationToken", *args.ContinuationToken)
+ }
+ if args.Select != nil {
+ queryParams.Add("select", string(*args.Select))
+ }
+ if args.Filter != nil {
+ queryParams.Add("$filter", *args.Filter)
+ }
+ if args.OrderBy != nil {
+ queryParams.Add("$orderBy", *args.OrderBy)
+ }
+ locationId, _ := uuid.Parse("387f832c-dbf2-4643-88e9-c1aa94dbb737")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.3", nil, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue PagedGraphMemberList
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the SearchUserEntitlements function
+type SearchUserEntitlementsArgs struct {
+ // (optional) Continuation token for getting the next page of data set. If null is passed, gets the first page.
+ ContinuationToken *string
+ // (optional) Comma (",") separated list of properties to select in the result entitlements. names of the properties are - 'Projects, 'Extensions' and 'Grouprules'.
+ Select *UserEntitlementProperty
+ // (optional) Equality operators relating to searching user entitlements seperated by and clauses. Valid filters include: licenseId, licenseStatus, userType, and name. licenseId: filters based on license assignment using license names. i.e. licenseId eq 'Account-Stakeholder' or licenseId eq 'Account-Express'. licenseStatus: filters based on license status. currently only supports disabled. i.e. licenseStatus eq 'Disabled'. To get disabled basic licenses, you would pass (licenseId eq 'Account-Express' and licenseStatus eq 'Disabled') userType: filters off identity type. Suppored types are member or guest i.e. userType eq 'member'. name: filters on if the user's display name or email contians given input. i.e. get all users with "test" in email or displayname is "name eq 'test'". A valid query could be: (licenseId eq 'Account-Stakeholder' or (licenseId eq 'Account-Express' and licenseStatus eq 'Disabled')) and name eq 'test' and userType eq 'guest'.
+ Filter *string
+ // (optional) PropertyName and Order (separated by a space ( )) to sort on (e.g. lastAccessed desc). Order defaults to ascending. valid properties to order by are dateCreated, lastAccessed, and name
+ OrderBy *string
+}
+
// [Preview API] Update entitlements (License Rule, Extensions Rule, Project memberships etc.) for a group.
func (client *ClientImpl) UpdateGroupEntitlement(ctx context.Context, args UpdateGroupEntitlementArgs) (*GroupEntitlementOperationReference, error) {
if args.Document == nil {
@@ -429,7 +429,7 @@ func (client *ClientImpl) UpdateGroupEntitlement(ctx context.Context, args Updat
return nil, marshalErr
}
locationId, _ := uuid.Parse("2280bffa-58a2-49da-822e-0764a1bb44f7")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1-preview.1", routeValues, queryParams, bytes.NewReader(body), "application/json-patch+json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0-preview.1", routeValues, queryParams, bytes.NewReader(body), "application/json-patch+json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -465,7 +465,7 @@ func (client *ClientImpl) UpdateUserEntitlement(ctx context.Context, args Update
return nil, marshalErr
}
locationId, _ := uuid.Parse("8480c6eb-ce60-47e9-88df-eca3c801638b")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1-preview.2", routeValues, nil, bytes.NewReader(body), "application/json-patch+json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0-preview.3", routeValues, nil, bytes.NewReader(body), "application/json-patch+json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -497,7 +497,7 @@ func (client *ClientImpl) UpdateUserEntitlements(ctx context.Context, args Updat
return nil, marshalErr
}
locationId, _ := uuid.Parse("387f832c-dbf2-4643-88e9-c1aa94dbb737")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1-preview.2", nil, queryParams, bytes.NewReader(body), "application/json-patch+json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0-preview.3", nil, queryParams, bytes.NewReader(body), "application/json-patch+json", "application/json", nil)
if err != nil {
return nil, err
}
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/memberentitlementmanagement/models.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/memberentitlementmanagement/models.go
similarity index 93%
rename from vendor/github.com/microsoft/azure-devops-go-api/azuredevops/memberentitlementmanagement/models.go
rename to vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/memberentitlementmanagement/models.go
index 6979b55ae..2268749a2 100644
--- a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/memberentitlementmanagement/models.go
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/memberentitlementmanagement/models.go
@@ -10,12 +10,12 @@ package memberentitlementmanagement
import (
"github.com/google/uuid"
- "github.com/microsoft/azure-devops-go-api/azuredevops"
- "github.com/microsoft/azure-devops-go-api/azuredevops/commerce"
- "github.com/microsoft/azure-devops-go-api/azuredevops/graph"
- "github.com/microsoft/azure-devops-go-api/azuredevops/licensing"
- "github.com/microsoft/azure-devops-go-api/azuredevops/licensingrule"
- "github.com/microsoft/azure-devops-go-api/azuredevops/operations"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/commerce"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/graph"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/licensing"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/licensingrule"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/operations"
)
type BaseOperationResult struct {
@@ -73,7 +73,7 @@ type Group struct {
// A group entity with additional properties including its license, extensions, and project membership
type GroupEntitlement struct {
- // Extension Rules.
+ // Deprecated:
ExtensionRules *[]Extension `json:"extensionRules,omitempty"`
// Member reference.
Group *graph.GraphGroup `json:"group,omitempty"`
@@ -307,21 +307,23 @@ type SummaryData struct {
type SummaryPropertyName string
type summaryPropertyNameValuesType struct {
- AccessLevels SummaryPropertyName
- Licenses SummaryPropertyName
- Extensions SummaryPropertyName
- Projects SummaryPropertyName
- Groups SummaryPropertyName
- All SummaryPropertyName
+ AccessLevels SummaryPropertyName
+ Licenses SummaryPropertyName
+ Extensions SummaryPropertyName
+ Projects SummaryPropertyName
+ Groups SummaryPropertyName
+ DefaultAccessLevel SummaryPropertyName
+ All SummaryPropertyName
}
var SummaryPropertyNameValues = summaryPropertyNameValuesType{
- AccessLevels: "accessLevels",
- Licenses: "licenses",
- Extensions: "extensions",
- Projects: "projects",
- Groups: "groups",
- All: "all",
+ AccessLevels: "accessLevels",
+ Licenses: "licenses",
+ Extensions: "extensions",
+ Projects: "projects",
+ Groups: "groups",
+ DefaultAccessLevel: "defaultAccessLevel",
+ All: "all",
}
// A reference to a team
@@ -338,7 +340,7 @@ type UserEntitlement struct {
AccessLevel *licensing.AccessLevel `json:"accessLevel,omitempty"`
// [Readonly] Date the user was added to the collection.
DateCreated *azuredevops.Time `json:"dateCreated,omitempty"`
- // User's extensions.
+ // Deprecated:
Extensions *[]Extension `json:"extensions,omitempty"`
// [Readonly] GroupEntitlements that this user belongs to.
GroupAssignments *[]GroupEntitlement `json:"groupAssignments,omitempty"`
@@ -428,7 +430,9 @@ type UserEntitlementsResponseBase struct {
type UsersSummary struct {
// Available Access Levels
AvailableAccessLevels *[]licensing.AccessLevel `json:"availableAccessLevels,omitempty"`
- // Summary of Extensions in the organization
+ // Default Access Level
+ DefaultAccessLevel *licensing.AccessLevel `json:"defaultAccessLevel,omitempty"`
+ // Deprecated:
Extensions *[]ExtensionSummaryData `json:"extensions,omitempty"`
// Group Options
GroupOptions *[]GroupOption `json:"groupOptions,omitempty"`
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/models.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/models.go
new file mode 100644
index 000000000..0079749ff
--- /dev/null
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/models.go
@@ -0,0 +1,149 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package azuredevops
+
+import (
+ "encoding/json"
+ "strconv"
+ "strings"
+ "time"
+
+ "github.com/google/uuid"
+)
+
+// ApiResourceLocation Information about the location of a REST API resource
+type ApiResourceLocation struct {
+ // Area name for this resource
+ Area *string `json:"area,omitempty"`
+ // Unique Identifier for this location
+ Id *uuid.UUID `json:"id,omitempty"`
+ // Maximum api version that this resource supports (current server version for this resource)
+ MaxVersion *string `json:"maxVersion,omitempty"`
+ // Minimum api version that this resource supports
+ MinVersion *string `json:"minVersion,omitempty"`
+ // The latest version of this resource location that is in "Release" (non-preview) mode
+ ReleasedVersion *string `json:"releasedVersion,omitempty"`
+ // Resource name
+ ResourceName *string `json:"resourceName,omitempty"`
+ // The current resource version supported by this resource location
+ ResourceVersion *int `json:"resourceVersion,omitempty"`
+ // This location's route template (templated relative path)
+ RouteTemplate *string `json:"routeTemplate,omitempty"`
+}
+
+// WrappedImproperError
+type WrappedImproperError struct {
+ Count *int `json:"count,omitempty"`
+ Value *ImproperError `json:"value,omitempty"`
+}
+
+// ImproperError
+type ImproperError struct {
+ Message *string `json:"Message,omitempty"`
+}
+
+// KeyValuePair
+type KeyValuePair struct {
+ Key *interface{} `json:"key,omitempty"`
+ Value *interface{} `json:"value,omitempty"`
+}
+
+// ResourceAreaInfo
+type ResourceAreaInfo struct {
+ Id *uuid.UUID `json:"id,omitempty"`
+ LocationUrl *string `json:"locationUrl,omitempty"`
+ Name *string `json:"name,omitempty"`
+}
+
+type Time struct {
+ Time time.Time
+}
+
+func (t *Time) UnmarshalJSON(b []byte) error {
+ t2 := time.Time{}
+ err := json.Unmarshal(b, &t2)
+
+ if err != nil {
+ parseError, ok := err.(*time.ParseError)
+ if ok {
+ if parseError.Value == "\"0001-01-01T00:00:00\"" {
+ // ignore errors for 0001-01-01T00:00:00 dates. The Azure DevOps service
+ // returns default dates in a format that is invalid for a time.Time. The
+ // correct value would have a 'z' at the end to represent utc. We are going
+ // to ignore this error, and set the value to the default time.Time value.
+ // https://github.com/microsoft/azure-devops-go-api/issues/17
+ err = nil
+ } else {
+ // workaround for bug https://github.com/microsoft/azure-devops-go-api/issues/59
+ // policy.CreatePolicyConfiguration returns an invalid date format of form
+ // "2006-01-02T15:04:05.999999999"
+ var innerError error
+ t2, innerError = time.Parse("2006-01-02T15:04:05.999999999", strings.Trim(parseError.Value, "\""))
+ if innerError == nil {
+ err = nil
+ }
+ }
+ }
+ }
+
+ t.Time = t2
+ return err
+}
+
+func (t *Time) MarshalJSON() ([]byte, error) {
+ return json.Marshal(t.Time)
+}
+
+// AsQueryParameter formats time value for query parameter usage.
+func (t Time) AsQueryParameter() string {
+ return t.Time.Format(time.RFC3339Nano)
+}
+
+func (t Time) String() string {
+ return t.Time.String()
+}
+
+func (t Time) Equal(u Time) bool {
+ return t.Time.Equal(u.Time)
+}
+
+// ServerSystemError
+type ServerSystemError struct {
+ ClassName *string `json:"className,omitempty"`
+ InnerException *ServerSystemError `json:"innerException,omitempty"`
+ Message *string `json:"message,omitempty"`
+}
+
+func (e ServerSystemError) Error() string {
+ return *e.Message
+}
+
+// VssJsonCollectionWrapper -
+type VssJsonCollectionWrapper struct {
+ Count *int `json:"count"`
+ Value *[]interface{} `json:"value"`
+}
+
+// WrappedError
+type WrappedError struct {
+ ExceptionId *string `json:"$id,omitempty"`
+ InnerError *WrappedError `json:"innerException,omitempty"`
+ Message *string `json:"message,omitempty"`
+ TypeName *string `json:"typeName,omitempty"`
+ TypeKey *string `json:"typeKey,omitempty"`
+ ErrorCode *int `json:"errorCode,omitempty"`
+ EventId *int `json:"eventId,omitempty"`
+ CustomProperties *map[string]interface{} `json:"customProperties,omitempty"`
+ StatusCode *int
+}
+
+func (e WrappedError) Error() string {
+ if e.Message == nil {
+ if e.StatusCode != nil {
+ return "REST call returned status code " + strconv.Itoa(*e.StatusCode)
+ }
+ return ""
+ }
+ return *e.Message
+}
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/operations/client.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/operations/client.go
similarity index 94%
rename from vendor/github.com/microsoft/azure-devops-go-api/azuredevops/operations/client.go
rename to vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/operations/client.go
index f6939dc8c..8dbc90e22 100644
--- a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/operations/client.go
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/operations/client.go
@@ -11,7 +11,7 @@ package operations
import (
"context"
"github.com/google/uuid"
- "github.com/microsoft/azure-devops-go-api/azuredevops"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6"
"net/http"
"net/url"
)
@@ -45,7 +45,7 @@ func (client *ClientImpl) GetOperation(ctx context.Context, args GetOperationArg
queryParams.Add("pluginId", (*args.PluginId).String())
}
locationId, _ := uuid.Parse("9a1b74b4-2ca8-4a9f-8470-c2f2e6fdc949")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/operations/models.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/operations/models.go
similarity index 100%
rename from vendor/github.com/microsoft/azure-devops-go-api/azuredevops/operations/models.go
rename to vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/operations/models.go
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/policy/client.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/policy/client.go
similarity index 93%
rename from vendor/github.com/microsoft/azure-devops-go-api/azuredevops/policy/client.go
rename to vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/policy/client.go
index 985639fae..0a19c680a 100644
--- a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/policy/client.go
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/policy/client.go
@@ -13,7 +13,7 @@ import (
"context"
"encoding/json"
"github.com/google/uuid"
- "github.com/microsoft/azure-devops-go-api/azuredevops"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6"
"net/http"
"net/url"
"strconv"
@@ -81,7 +81,7 @@ func (client *ClientImpl) CreatePolicyConfiguration(ctx context.Context, args Cr
return nil, marshalErr
}
locationId, _ := uuid.Parse("dad91cbe-d183-45f8-9c6e-9c1164472121")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -114,7 +114,7 @@ func (client *ClientImpl) DeletePolicyConfiguration(ctx context.Context, args De
routeValues["configurationId"] = strconv.Itoa(*args.ConfigurationId)
locationId, _ := uuid.Parse("dad91cbe-d183-45f8-9c6e-9c1164472121")
- _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return err
}
@@ -143,7 +143,7 @@ func (client *ClientImpl) GetPolicyConfiguration(ctx context.Context, args GetPo
routeValues["configurationId"] = strconv.Itoa(*args.ConfigurationId)
locationId, _ := uuid.Parse("dad91cbe-d183-45f8-9c6e-9c1164472121")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -178,7 +178,7 @@ func (client *ClientImpl) GetPolicyConfigurationRevision(ctx context.Context, ar
routeValues["revisionId"] = strconv.Itoa(*args.RevisionId)
locationId, _ := uuid.Parse("fe1e68a2-60d3-43cb-855b-85e41ae97c95")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -218,7 +218,7 @@ func (client *ClientImpl) GetPolicyConfigurationRevisions(ctx context.Context, a
queryParams.Add("$skip", strconv.Itoa(*args.Skip))
}
locationId, _ := uuid.Parse("fe1e68a2-60d3-43cb-855b-85e41ae97c95")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -252,17 +252,11 @@ func (client *ClientImpl) GetPolicyConfigurations(ctx context.Context, args GetP
if args.Scope != nil {
queryParams.Add("scope", *args.Scope)
}
- if args.Top != nil {
- queryParams.Add("$top", strconv.Itoa(*args.Top))
- }
- if args.ContinuationToken != nil {
- queryParams.Add("continuationToken", *args.ContinuationToken)
- }
if args.PolicyType != nil {
queryParams.Add("policyType", (*args.PolicyType).String())
}
locationId, _ := uuid.Parse("dad91cbe-d183-45f8-9c6e-9c1164472121")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -279,18 +273,13 @@ type GetPolicyConfigurationsArgs struct {
Project *string
// (optional) [Provided for legacy reasons] The scope on which a subset of policies is defined.
Scope *string
- // (optional) Maximum number of policies to return.
- Top *int
- // (optional) The continuation token used for pagination.
- ContinuationToken *string
// (optional) Filter returned policies to only this type
PolicyType *uuid.UUID
}
// Return type for the GetPolicyConfigurations function
type GetPolicyConfigurationsResponseValue struct {
- Value []PolicyConfiguration
- // The continuation token to be used to get the next page of results.
+ Value []PolicyConfiguration
ContinuationToken string
}
@@ -307,7 +296,7 @@ func (client *ClientImpl) GetPolicyEvaluation(ctx context.Context, args GetPolic
routeValues["evaluationId"] = (*args.EvaluationId).String()
locationId, _ := uuid.Parse("46aecb7a-5d2c-4647-897b-0209505a9fe4")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -348,7 +337,7 @@ func (client *ClientImpl) GetPolicyEvaluations(ctx context.Context, args GetPoli
queryParams.Add("$skip", strconv.Itoa(*args.Skip))
}
locationId, _ := uuid.Parse("c23ddff5-229c-4d04-a80b-0fdce9f360c8")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -385,7 +374,7 @@ func (client *ClientImpl) GetPolicyType(ctx context.Context, args GetPolicyTypeA
routeValues["typeId"] = (*args.TypeId).String()
locationId, _ := uuid.Parse("44096322-2d3d-466a-bb30-d1b7de69f61f")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -412,7 +401,7 @@ func (client *ClientImpl) GetPolicyTypes(ctx context.Context, args GetPolicyType
routeValues["project"] = *args.Project
locationId, _ := uuid.Parse("44096322-2d3d-466a-bb30-d1b7de69f61f")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -441,7 +430,7 @@ func (client *ClientImpl) RequeuePolicyEvaluation(ctx context.Context, args Requ
routeValues["evaluationId"] = (*args.EvaluationId).String()
locationId, _ := uuid.Parse("46aecb7a-5d2c-4647-897b-0209505a9fe4")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -479,7 +468,7 @@ func (client *ClientImpl) UpdatePolicyConfiguration(ctx context.Context, args Up
return nil, marshalErr
}
locationId, _ := uuid.Parse("dad91cbe-d183-45f8-9c6e-9c1164472121")
- resp, err := client.Client.Send(ctx, http.MethodPut, locationId, "5.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPut, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/policy/models.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/policy/models.go
similarity index 94%
rename from vendor/github.com/microsoft/azure-devops-go-api/azuredevops/policy/models.go
rename to vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/policy/models.go
index c0c405c31..576cf6edb 100644
--- a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/policy/models.go
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/policy/models.go
@@ -10,8 +10,8 @@ package policy
import (
"github.com/google/uuid"
- "github.com/microsoft/azure-devops-go-api/azuredevops"
- "github.com/microsoft/azure-devops-go-api/azuredevops/webapi"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/webapi"
)
// The full policy configuration with settings.
@@ -36,6 +36,8 @@ type PolicyConfiguration struct {
IsDeleted *bool `json:"isDeleted,omitempty"`
// Indicates whether the policy is enabled.
IsEnabled *bool `json:"isEnabled,omitempty"`
+ // If set, this policy requires "Manage Enterprise Policies" permission to create, edit, or delete.
+ IsEnterpriseManaged *bool `json:"isEnterpriseManaged,omitempty"`
// The policy configuration settings.
Settings interface{} `json:"settings,omitempty"`
}
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/profile/client.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/profile/client.go
similarity index 96%
rename from vendor/github.com/microsoft/azure-devops-go-api/azuredevops/profile/client.go
rename to vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/profile/client.go
index 2684d548d..8a5309805 100644
--- a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/profile/client.go
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/profile/client.go
@@ -11,7 +11,7 @@ package profile
import (
"context"
"github.com/google/uuid"
- "github.com/microsoft/azure-devops-go-api/azuredevops"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6"
"net/http"
"net/url"
"strconv"
@@ -63,7 +63,7 @@ func (client *ClientImpl) GetProfile(ctx context.Context, args GetProfileArgs) (
queryParams.Add("forceRefresh", strconv.FormatBool(*args.ForceRefresh))
}
locationId, _ := uuid.Parse("f83735dc-483f-4238-a291-d45f6080a9af")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/profile/models.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/profile/models.go
similarity index 99%
rename from vendor/github.com/microsoft/azure-devops-go-api/azuredevops/profile/models.go
rename to vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/profile/models.go
index ee68a9d00..71b6b8f9e 100644
--- a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/profile/models.go
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/profile/models.go
@@ -10,7 +10,7 @@ package profile
import (
"github.com/google/uuid"
- "github.com/microsoft/azure-devops-go-api/azuredevops"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6"
)
// Identifies an attribute with a name and a container.
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/release/client.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/release/client.go
similarity index 95%
rename from vendor/github.com/microsoft/azure-devops-go-api/azuredevops/release/client.go
rename to vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/release/client.go
index a753315d2..871b270c5 100644
--- a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/release/client.go
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/release/client.go
@@ -13,7 +13,7 @@ import (
"context"
"encoding/json"
"github.com/google/uuid"
- "github.com/microsoft/azure-devops-go-api/azuredevops"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6"
"io"
"net/http"
"net/url"
@@ -115,7 +115,7 @@ func (client *ClientImpl) CreateFolder(ctx context.Context, args CreateFolderArg
return nil, marshalErr
}
locationId, _ := uuid.Parse("f7ddf76d-ce0c-4d68-94ff-becaec5d9dea")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.2", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.2", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -149,7 +149,7 @@ func (client *ClientImpl) CreateRelease(ctx context.Context, args CreateReleaseA
return nil, marshalErr
}
locationId, _ := uuid.Parse("a166fde7-27ad-408e-ba75-703c2cc9d500")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -183,7 +183,7 @@ func (client *ClientImpl) CreateReleaseDefinition(ctx context.Context, args Crea
return nil, marshalErr
}
locationId, _ := uuid.Parse("d8f96f24-8ea7-4cb6-baab-2df8fc515665")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -214,7 +214,7 @@ func (client *ClientImpl) DeleteFolder(ctx context.Context, args DeleteFolderArg
routeValues["path"] = *args.Path
locationId, _ := uuid.Parse("f7ddf76d-ce0c-4d68-94ff-becaec5d9dea")
- _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1-preview.2", routeValues, nil, nil, "", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0-preview.2", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return err
}
@@ -250,7 +250,7 @@ func (client *ClientImpl) DeleteReleaseDefinition(ctx context.Context, args Dele
queryParams.Add("forceDelete", strconv.FormatBool(*args.ForceDelete))
}
locationId, _ := uuid.Parse("d8f96f24-8ea7-4cb6-baab-2df8fc515665")
- _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return err
}
@@ -309,7 +309,7 @@ func (client *ClientImpl) GetApprovals(ctx context.Context, args GetApprovalsArg
queryParams.Add("includeMyGroupApprovals", strconv.FormatBool(*args.IncludeMyGroupApprovals))
}
locationId, _ := uuid.Parse("b47c6458-e73b-47cb-a770-4df1e8813a91")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -344,8 +344,7 @@ type GetApprovalsArgs struct {
// Return type for the GetApprovals function
type GetApprovalsResponseValue struct {
- Value []ReleaseApproval
- // The continuation token to be used to get the next page of results.
+ Value []ReleaseApproval
ContinuationToken string
}
@@ -366,7 +365,7 @@ func (client *ClientImpl) GetDefinitionRevision(ctx context.Context, args GetDef
routeValues["revision"] = strconv.Itoa(*args.Revision)
locationId, _ := uuid.Parse("258b82e0-9d41-43f3-86d6-fef14ddd44bc")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "text/plain", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "text/plain", nil)
if err != nil {
return nil, err
}
@@ -402,10 +401,10 @@ func (client *ClientImpl) GetDeployments(ctx context.Context, args GetDeployment
queryParams.Add("createdBy", *args.CreatedBy)
}
if args.MinModifiedTime != nil {
- queryParams.Add("minModifiedTime", (*args.MinModifiedTime).String())
+ queryParams.Add("minModifiedTime", (*args.MinModifiedTime).AsQueryParameter())
}
if args.MaxModifiedTime != nil {
- queryParams.Add("maxModifiedTime", (*args.MaxModifiedTime).String())
+ queryParams.Add("maxModifiedTime", (*args.MaxModifiedTime).AsQueryParameter())
}
if args.DeploymentStatus != nil {
queryParams.Add("deploymentStatus", string(*args.DeploymentStatus))
@@ -429,16 +428,16 @@ func (client *ClientImpl) GetDeployments(ctx context.Context, args GetDeployment
queryParams.Add("createdFor", *args.CreatedFor)
}
if args.MinStartedTime != nil {
- queryParams.Add("minStartedTime", (*args.MinStartedTime).String())
+ queryParams.Add("minStartedTime", (*args.MinStartedTime).AsQueryParameter())
}
if args.MaxStartedTime != nil {
- queryParams.Add("maxStartedTime", (*args.MaxStartedTime).String())
+ queryParams.Add("maxStartedTime", (*args.MaxStartedTime).AsQueryParameter())
}
if args.SourceBranch != nil {
queryParams.Add("sourceBranch", *args.SourceBranch)
}
locationId, _ := uuid.Parse("b005ef73-cddc-448e-9ba2-5193bf36b19f")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -487,8 +486,7 @@ type GetDeploymentsArgs struct {
// Return type for the GetDeployments function
type GetDeploymentsResponseValue struct {
- Value []Deployment
- // The continuation token to be used to get the next page of results.
+ Value []Deployment
ContinuationToken string
}
@@ -508,7 +506,7 @@ func (client *ClientImpl) GetFolders(ctx context.Context, args GetFoldersArgs) (
queryParams.Add("queryOrder", string(*args.QueryOrder))
}
locationId, _ := uuid.Parse("f7ddf76d-ce0c-4d68-94ff-becaec5d9dea")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.2", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.2", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -541,7 +539,7 @@ func (client *ClientImpl) GetLogs(ctx context.Context, args GetLogsArgs) (io.Rea
routeValues["releaseId"] = strconv.Itoa(*args.ReleaseId)
locationId, _ := uuid.Parse("c37fbab5-214b-48e4-a55b-cb6b4f6e4038")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.2", routeValues, nil, nil, "", "application/zip", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.2", routeValues, nil, nil, "", "application/zip", nil)
if err != nil {
return nil, err
}
@@ -574,7 +572,7 @@ func (client *ClientImpl) GetManualIntervention(ctx context.Context, args GetMan
routeValues["manualInterventionId"] = strconv.Itoa(*args.ManualInterventionId)
locationId, _ := uuid.Parse("616c46e4-f370-4456-adaa-fbaf79c7b79e")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -607,7 +605,7 @@ func (client *ClientImpl) GetManualInterventions(ctx context.Context, args GetMa
routeValues["releaseId"] = strconv.Itoa(*args.ReleaseId)
locationId, _ := uuid.Parse("616c46e4-f370-4456-adaa-fbaf79c7b79e")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -652,7 +650,7 @@ func (client *ClientImpl) GetRelease(ctx context.Context, args GetReleaseArgs) (
queryParams.Add("$topGateRecords", strconv.Itoa(*args.TopGateRecords))
}
locationId, _ := uuid.Parse("a166fde7-27ad-408e-ba75-703c2cc9d500")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -696,7 +694,7 @@ func (client *ClientImpl) GetReleaseDefinition(ctx context.Context, args GetRele
queryParams.Add("propertyFilters", listAsString)
}
locationId, _ := uuid.Parse("d8f96f24-8ea7-4cb6-baab-2df8fc515665")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -729,7 +727,7 @@ func (client *ClientImpl) GetReleaseDefinitionHistory(ctx context.Context, args
routeValues["definitionId"] = strconv.Itoa(*args.DefinitionId)
locationId, _ := uuid.Parse("258b82e0-9d41-43f3-86d6-fef14ddd44bc")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -802,7 +800,7 @@ func (client *ClientImpl) GetReleaseDefinitions(ctx context.Context, args GetRel
queryParams.Add("searchTextContainsFolderName", strconv.FormatBool(*args.SearchTextContainsFolderName))
}
locationId, _ := uuid.Parse("d8f96f24-8ea7-4cb6-baab-2df8fc515665")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -849,8 +847,7 @@ type GetReleaseDefinitionsArgs struct {
// Return type for the GetReleaseDefinitions function
type GetReleaseDefinitionsResponseValue struct {
- Value []ReleaseDefinition
- // The continuation token to be used to get the next page of results.
+ Value []ReleaseDefinition
ContinuationToken string
}
@@ -871,7 +868,7 @@ func (client *ClientImpl) GetReleaseEnvironment(ctx context.Context, args GetRel
routeValues["environmentId"] = strconv.Itoa(*args.EnvironmentId)
locationId, _ := uuid.Parse("a7e426b1-03dc-48af-9dfe-c98bac612dcb")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.6", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.6", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -909,7 +906,7 @@ func (client *ClientImpl) GetReleaseRevision(ctx context.Context, args GetReleas
}
queryParams.Add("definitionSnapshotRevision", strconv.Itoa(*args.DefinitionSnapshotRevision))
locationId, _ := uuid.Parse("a166fde7-27ad-408e-ba75-703c2cc9d500")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "text/plain", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "text/plain", nil)
if err != nil {
return nil, err
}
@@ -954,10 +951,10 @@ func (client *ClientImpl) GetReleases(ctx context.Context, args GetReleasesArgs)
queryParams.Add("environmentStatusFilter", strconv.Itoa(*args.EnvironmentStatusFilter))
}
if args.MinCreatedTime != nil {
- queryParams.Add("minCreatedTime", (*args.MinCreatedTime).String())
+ queryParams.Add("minCreatedTime", (*args.MinCreatedTime).AsQueryParameter())
}
if args.MaxCreatedTime != nil {
- queryParams.Add("maxCreatedTime", (*args.MaxCreatedTime).String())
+ queryParams.Add("maxCreatedTime", (*args.MaxCreatedTime).AsQueryParameter())
}
if args.QueryOrder != nil {
queryParams.Add("queryOrder", string(*args.QueryOrder))
@@ -1006,7 +1003,7 @@ func (client *ClientImpl) GetReleases(ctx context.Context, args GetReleasesArgs)
queryParams.Add("path", *args.Path)
}
locationId, _ := uuid.Parse("a166fde7-27ad-408e-ba75-703c2cc9d500")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1067,8 +1064,7 @@ type GetReleasesArgs struct {
// Return type for the GetReleases function
type GetReleasesResponseValue struct {
- Value []Release
- // The continuation token to be used to get the next page of results.
+ Value []Release
ContinuationToken string
}
@@ -1113,7 +1109,7 @@ func (client *ClientImpl) GetReleaseTaskAttachmentContent(ctx context.Context, a
routeValues["name"] = *args.Name
locationId, _ := uuid.Parse("60b86efb-7b8c-4853-8f9f-aa142b77b479")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/octet-stream", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/octet-stream", nil)
if err != nil {
return nil, err
}
@@ -1172,7 +1168,7 @@ func (client *ClientImpl) GetReleaseTaskAttachments(ctx context.Context, args Ge
routeValues["type"] = *args.Type
locationId, _ := uuid.Parse("a4d06688-0dfa-4895-82a5-f43ec9452306")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1230,7 +1226,7 @@ func (client *ClientImpl) GetTaskLog(ctx context.Context, args GetTaskLogArgs) (
queryParams.Add("endLine", strconv.FormatUint(*args.EndLine, 10))
}
locationId, _ := uuid.Parse("17c91af7-09fd-4256-bff1-c24ee4f73bc0")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.2", routeValues, queryParams, nil, "", "text/plain", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.2", routeValues, queryParams, nil, "", "text/plain", nil)
if err != nil {
return nil, err
}
@@ -1276,7 +1272,7 @@ func (client *ClientImpl) UpdateFolder(ctx context.Context, args UpdateFolderArg
return nil, marshalErr
}
locationId, _ := uuid.Parse("f7ddf76d-ce0c-4d68-94ff-becaec5d9dea")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1-preview.2", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0-preview.2", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1316,7 +1312,7 @@ func (client *ClientImpl) UpdateGates(ctx context.Context, args UpdateGatesArgs)
return nil, marshalErr
}
locationId, _ := uuid.Parse("2666a539-2001-4f80-bcc7-0379956749d4")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1360,7 +1356,7 @@ func (client *ClientImpl) UpdateManualIntervention(ctx context.Context, args Upd
return nil, marshalErr
}
locationId, _ := uuid.Parse("616c46e4-f370-4456-adaa-fbaf79c7b79e")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1402,7 +1398,7 @@ func (client *ClientImpl) UpdateRelease(ctx context.Context, args UpdateReleaseA
return nil, marshalErr
}
locationId, _ := uuid.Parse("a166fde7-27ad-408e-ba75-703c2cc9d500")
- resp, err := client.Client.Send(ctx, http.MethodPut, locationId, "5.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPut, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1442,7 +1438,7 @@ func (client *ClientImpl) UpdateReleaseApproval(ctx context.Context, args Update
return nil, marshalErr
}
locationId, _ := uuid.Parse("9328e074-59fb-465a-89d9-b09c82ee5109")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1478,7 +1474,7 @@ func (client *ClientImpl) UpdateReleaseDefinition(ctx context.Context, args Upda
return nil, marshalErr
}
locationId, _ := uuid.Parse("d8f96f24-8ea7-4cb6-baab-2df8fc515665")
- resp, err := client.Client.Send(ctx, http.MethodPut, locationId, "5.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPut, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1520,7 +1516,7 @@ func (client *ClientImpl) UpdateReleaseEnvironment(ctx context.Context, args Upd
return nil, marshalErr
}
locationId, _ := uuid.Parse("a7e426b1-03dc-48af-9dfe-c98bac612dcb")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1-preview.6", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0-preview.6", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1562,7 +1558,7 @@ func (client *ClientImpl) UpdateReleaseResource(ctx context.Context, args Update
return nil, marshalErr
}
locationId, _ := uuid.Parse("a166fde7-27ad-408e-ba75-703c2cc9d500")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/release/models.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/release/models.go
similarity index 95%
rename from vendor/github.com/microsoft/azure-devops-go-api/azuredevops/release/models.go
rename to vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/release/models.go
index f505e8c92..a8b2f1a91 100644
--- a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/release/models.go
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/release/models.go
@@ -10,10 +10,10 @@ package release
import (
"github.com/google/uuid"
- "github.com/microsoft/azure-devops-go-api/azuredevops"
- "github.com/microsoft/azure-devops-go-api/azuredevops/distributedtaskcommon"
- "github.com/microsoft/azure-devops-go-api/azuredevops/forminput"
- "github.com/microsoft/azure-devops-go-api/azuredevops/webapi"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/distributedtaskcommon"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/forminput"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/webapi"
)
type AgentArtifactDefinition struct {
@@ -272,6 +272,8 @@ type ArtifactFilter struct {
CreateReleaseOnBuildTagging *bool `json:"createReleaseOnBuildTagging,omitempty"`
// Gets or sets the branch for the filter.
SourceBranch *string `json:"sourceBranch,omitempty"`
+ // Gets or sets the regex based tag filter.
+ TagFilter *TagFilter `json:"tagFilter,omitempty"`
// Gets or sets the list of tags for the filter.
Tags *[]string `json:"tags,omitempty"`
// Gets or sets whether filter should default to build definition branch.
@@ -360,6 +362,10 @@ type ArtifactTypeDefinition struct {
EndpointTypeId *string `json:"endpointTypeId,omitempty"`
// Gets or sets the input descriptors of artifact type definition.
InputDescriptors *[]forminput.InputDescriptor `json:"inputDescriptors,omitempty"`
+ // Gets or sets the is commits tracebility supported value of artifact type defintion.
+ IsCommitsTraceabilitySupported *bool `json:"isCommitsTraceabilitySupported,omitempty"`
+ // Gets or sets the is workitems tracebility supported value of artifact type defintion.
+ IsWorkitemsTraceabilitySupported *bool `json:"isWorkitemsTraceabilitySupported,omitempty"`
// Gets or sets the name of artifact type definition.
Name *string `json:"name,omitempty"`
// Gets or sets the unique source identifier of artifact type definition.
@@ -434,6 +440,8 @@ type AzureKeyVaultVariableGroupProviderData struct {
}
type AzureKeyVaultVariableValue struct {
+ // Gets or sets if the variable is read only or not.
+ IsReadOnly *bool `json:"isReadOnly,omitempty"`
// Gets or sets as the variable is secret or not.
IsSecret *bool `json:"isSecret,omitempty"`
// Gets or sets the value.
@@ -708,12 +716,20 @@ type Deployment struct {
}
type DeploymentApprovalCompletedEvent struct {
- Approval *ReleaseApproval `json:"approval,omitempty"`
- Project *ProjectReference `json:"project,omitempty"`
- Release *Release `json:"release,omitempty"`
+ Id *int `json:"id,omitempty"`
+ Url *string `json:"url,omitempty"`
+ AttemptId *int `json:"attemptId,omitempty"`
+ StageName *string `json:"stageName,omitempty"`
+ Approval *ReleaseApproval `json:"approval,omitempty"`
+ Project *ProjectReference `json:"project,omitempty"`
+ Release *Release `json:"release,omitempty"`
}
type DeploymentApprovalPendingEvent struct {
+ Id *int `json:"id,omitempty"`
+ Url *string `json:"url,omitempty"`
+ AttemptId *int `json:"attemptId,omitempty"`
+ StageName *string `json:"stageName,omitempty"`
Approval *ReleaseApproval `json:"approval,omitempty"`
ApprovalOptions *ApprovalOptions `json:"approvalOptions,omitempty"`
CompletedApprovals *[]ReleaseApproval `json:"completedApprovals,omitempty"`
@@ -794,6 +810,10 @@ var DeploymentAuthorizationOwnerValues = deploymentAuthorizationOwnerValuesType{
}
type DeploymentCompletedEvent struct {
+ Id *int `json:"id,omitempty"`
+ Url *string `json:"url,omitempty"`
+ AttemptId *int `json:"attemptId,omitempty"`
+ StageName *string `json:"stageName,omitempty"`
Comment *string `json:"comment,omitempty"`
Data *map[string]interface{} `json:"data,omitempty"`
Deployment *Deployment `json:"deployment,omitempty"`
@@ -801,6 +821,13 @@ type DeploymentCompletedEvent struct {
Project *ProjectReference `json:"project,omitempty"`
}
+type DeploymentEvent struct {
+ Id *int `json:"id,omitempty"`
+ Url *string `json:"url,omitempty"`
+ AttemptId *int `json:"attemptId,omitempty"`
+ StageName *string `json:"stageName,omitempty"`
+}
+
// [Flags]
type DeploymentExpands string
@@ -996,6 +1023,10 @@ var DeploymentsQueryTypeValues = deploymentsQueryTypeValuesType{
}
type DeploymentStartedEvent struct {
+ Id *int `json:"id,omitempty"`
+ Url *string `json:"url,omitempty"`
+ AttemptId *int `json:"attemptId,omitempty"`
+ StageName *string `json:"stageName,omitempty"`
Environment *ReleaseEnvironment `json:"environment,omitempty"`
Project *ProjectReference `json:"project,omitempty"`
Release *Release `json:"release,omitempty"`
@@ -1574,6 +1605,18 @@ type MultiMachineInput struct {
MaxNumberOfAgents *int `json:"maxNumberOfAgents,omitempty"`
}
+type OrgPipelineReleaseSettings struct {
+ // Defines whether user can manage pipeline settings.
+ HasManagePipelinePoliciesPermission *bool `json:"hasManagePipelinePoliciesPermission,omitempty"`
+ // EnforceJobAuthScope setting at organisaion level. If enabled, scope of access for all release pipelines in the organisation reduces to the current project.
+ OrgEnforceJobAuthScope *bool `json:"orgEnforceJobAuthScope,omitempty"`
+}
+
+type OrgPipelineReleaseSettingsUpdateParameters struct {
+ // EnforceJobAuthScope setting at organisaion level. If enabled, scope of access for all release pipelines in the organisation reduces to the current project.
+ OrgEnforceJobAuthScope *bool `json:"orgEnforceJobAuthScope,omitempty"`
+}
+
type PackageTrigger struct {
// Type of release trigger.
TriggerType *ReleaseTriggerType `json:"triggerType,omitempty"`
@@ -1618,6 +1661,22 @@ var PipelineProcessTypesValues = pipelineProcessTypesValuesType{
Yaml: "yaml",
}
+type ProjectPipelineReleaseSettings struct {
+ // EnforceJobAuthScope setting at project level. If enabled, scope of access for all release pipelines reduces to the current project.
+ EnforceJobAuthScope *bool `json:"enforceJobAuthScope,omitempty"`
+ // Defines whether user can manage pipeline settings.
+ HasManageSettingsPermission *bool `json:"hasManageSettingsPermission,omitempty"`
+ // EnforceJobAuthScope setting at organisaion level. If enabled, scope of access for all release pipelines in the organisation reduces to the current project.
+ OrgEnforceJobAuthScope *bool `json:"orgEnforceJobAuthScope,omitempty"`
+ // Defines whether project is public.
+ PublicProject *bool `json:"publicProject,omitempty"`
+}
+
+type ProjectPipelineReleaseSettingsUpdateParameters struct {
+ // EnforceJobAuthScope setting at project level. If enabled, scope of access for all release pipelines reduces to the current project.
+ EnforceJobAuthScope *bool `json:"enforceJobAuthScope,omitempty"`
+}
+
type ProjectReference struct {
// Gets the unique identifier of this field.
Id *uuid.UUID `json:"id,omitempty"`
@@ -1716,6 +1775,8 @@ type Release struct {
Comment *string `json:"comment,omitempty"`
// Gets or sets the identity who created.
CreatedBy *webapi.IdentityRef `json:"createdBy,omitempty"`
+ // Gets or sets the identity for whom release was created.
+ CreatedFor *webapi.IdentityRef `json:"createdFor,omitempty"`
// Gets date on which it got created.
CreatedOn *azuredevops.Time `json:"createdOn,omitempty"`
// Gets revision number of definition snapshot.
@@ -1763,6 +1824,8 @@ type Release struct {
}
type ReleaseAbandonedEvent struct {
+ Id *int `json:"id,omitempty"`
+ Url *string `json:"url,omitempty"`
Project *ProjectReference `json:"project,omitempty"`
Release *Release `json:"release,omitempty"`
}
@@ -1871,6 +1934,8 @@ type ReleaseCondition struct {
}
type ReleaseCreatedEvent struct {
+ Id *int `json:"id,omitempty"`
+ Url *string `json:"url,omitempty"`
Project *ProjectReference `json:"project,omitempty"`
Release *Release `json:"release,omitempty"`
}
@@ -2336,6 +2401,11 @@ type ReleaseEnvironmentUpdateMetadata struct {
Variables *map[string]ConfigurationVariableValue `json:"variables,omitempty"`
}
+type ReleaseEvent struct {
+ Id *int `json:"id,omitempty"`
+ Url *string `json:"url,omitempty"`
+}
+
// [Flags]
type ReleaseExpands string
@@ -2721,6 +2791,8 @@ type ReleaseWorkItemRef struct {
Assignee *string `json:"assignee,omitempty"`
// Gets or sets the ID.
Id *string `json:"id,omitempty"`
+ // Gets or sets the provider.
+ Provider *string `json:"provider,omitempty"`
// Gets or sets the state.
State *string `json:"state,omitempty"`
// Gets or sets the title.
@@ -2983,6 +3055,8 @@ type VariableGroup struct {
ProviderData interface{} `json:"providerData,omitempty"`
// Gets or sets type.
Type *string `json:"type,omitempty"`
+ // all project references where the variable group is shared with other projects.
+ VariableGroupProjectReferences *[]VariableGroupProjectReference `json:"variableGroupProjectReferences,omitempty"`
// Gets and sets the dictionary of variables.
Variables *map[string]interface{} `json:"variables,omitempty"`
}
@@ -3002,10 +3076,22 @@ var VariableGroupActionFilterValues = variableGroupActionFilterValuesType{
Use: "use",
}
+// A variable group reference is a shallow reference to variable group.
+type VariableGroupProjectReference struct {
+ // Gets or sets description of the variable group.
+ Description *string `json:"description,omitempty"`
+ // Gets or sets name of the variable group.
+ Name *string `json:"name,omitempty"`
+ // Gets or sets project reference of the variable group.
+ ProjectReference *ProjectReference `json:"projectReference,omitempty"`
+}
+
type VariableGroupProviderData struct {
}
type VariableValue struct {
+ // Gets or sets if the variable is read only or not.
+ IsReadOnly *bool `json:"isReadOnly,omitempty"`
// Gets or sets as the variable is secret or not.
IsSecret *bool `json:"isSecret,omitempty"`
// Gets or sets the value.
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/security/client.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/security/client.go
new file mode 100644
index 000000000..00e4d2b23
--- /dev/null
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/security/client.go
@@ -0,0 +1,380 @@
+// --------------------------------------------------------------------------------------------
+// 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 security
+
+import (
+ "bytes"
+ "context"
+ "encoding/json"
+ "github.com/google/uuid"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6"
+ "net/http"
+ "net/url"
+ "strconv"
+)
+
+type Client interface {
+ // Evaluates whether the caller has the specified permissions on the specified set of security tokens.
+ HasPermissions(context.Context, HasPermissionsArgs) (*[]bool, error)
+ // Evaluates multiple permissions for the calling user. Note: This method does not aggregate the results, nor does it short-circuit if one of the permissions evaluates to false.
+ HasPermissionsBatch(context.Context, HasPermissionsBatchArgs) (*PermissionEvaluationBatch, error)
+ // Return a list of access control lists for the specified security namespace and token. All ACLs in the security namespace will be retrieved if no optional parameters are provided.
+ QueryAccessControlLists(context.Context, QueryAccessControlListsArgs) (*[]AccessControlList, error)
+ // List all security namespaces or just the specified namespace.
+ QuerySecurityNamespaces(context.Context, QuerySecurityNamespacesArgs) (*[]SecurityNamespaceDescription, error)
+ // Remove the specified ACEs from the ACL belonging to the specified token.
+ RemoveAccessControlEntries(context.Context, RemoveAccessControlEntriesArgs) (*bool, error)
+ // Remove access control lists under the specfied security namespace.
+ RemoveAccessControlLists(context.Context, RemoveAccessControlListsArgs) (*bool, error)
+ // Removes the specified permissions on a security token for a user or group.
+ RemovePermission(context.Context, RemovePermissionArgs) (*AccessControlEntry, error)
+ // Add or update ACEs in the ACL for the provided token. The request body contains the target token, a list of [ACEs](https://docs.microsoft.com/en-us/rest/api/azure/devops/security/access%20control%20entries/set%20access%20control%20entries?#accesscontrolentry) and a optional merge parameter. In the case of a collision (by identity descriptor) with an existing ACE in the ACL, the "merge" parameter determines the behavior. If set, the existing ACE has its allow and deny merged with the incoming ACE's allow and deny. If unset, the existing ACE is displaced.
+ SetAccessControlEntries(context.Context, SetAccessControlEntriesArgs) (*[]AccessControlEntry, error)
+ // Create or update one or more access control lists. All data that currently exists for the ACLs supplied will be overwritten.
+ SetAccessControlLists(context.Context, SetAccessControlListsArgs) error
+}
+
+type ClientImpl struct {
+ Client azuredevops.Client
+}
+
+func NewClient(ctx context.Context, connection *azuredevops.Connection) Client {
+ client := connection.GetClientByUrl(connection.BaseUrl)
+ return &ClientImpl{
+ Client: *client,
+ }
+}
+
+// Evaluates whether the caller has the specified permissions on the specified set of security tokens.
+func (client *ClientImpl) HasPermissions(ctx context.Context, args HasPermissionsArgs) (*[]bool, error) {
+ routeValues := make(map[string]string)
+ if args.SecurityNamespaceId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.SecurityNamespaceId"}
+ }
+ routeValues["securityNamespaceId"] = (*args.SecurityNamespaceId).String()
+ if args.Permissions != nil {
+ routeValues["permissions"] = strconv.Itoa(*args.Permissions)
+ }
+
+ queryParams := url.Values{}
+ if args.Tokens != nil {
+ queryParams.Add("tokens", *args.Tokens)
+ }
+ if args.AlwaysAllowAdministrators != nil {
+ queryParams.Add("alwaysAllowAdministrators", strconv.FormatBool(*args.AlwaysAllowAdministrators))
+ }
+ if args.Delimiter != nil {
+ queryParams.Add("delimiter", *args.Delimiter)
+ }
+ locationId, _ := uuid.Parse("dd3b8bd6-c7fc-4cbd-929a-933d9c011c9d")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []bool
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the HasPermissions function
+type HasPermissionsArgs struct {
+ // (required) Security namespace identifier.
+ SecurityNamespaceId *uuid.UUID
+ // (optional) Permissions to evaluate.
+ Permissions *int
+ // (optional) One or more security tokens to evaluate.
+ Tokens *string
+ // (optional) If true and if the caller is an administrator, always return true.
+ AlwaysAllowAdministrators *bool
+ // (optional) Optional security token separator. Defaults to ",".
+ Delimiter *string
+}
+
+// Evaluates multiple permissions for the calling user. Note: This method does not aggregate the results, nor does it short-circuit if one of the permissions evaluates to false.
+func (client *ClientImpl) HasPermissionsBatch(ctx context.Context, args HasPermissionsBatchArgs) (*PermissionEvaluationBatch, error) {
+ if args.EvalBatch == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.EvalBatch"}
+ }
+ body, marshalErr := json.Marshal(*args.EvalBatch)
+ if marshalErr != nil {
+ return nil, marshalErr
+ }
+ locationId, _ := uuid.Parse("cf1faa59-1b63-4448-bf04-13d981a46f5d")
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0", nil, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue PermissionEvaluationBatch
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the HasPermissionsBatch function
+type HasPermissionsBatchArgs struct {
+ // (required) The set of evaluation requests.
+ EvalBatch *PermissionEvaluationBatch
+}
+
+// Return a list of access control lists for the specified security namespace and token. All ACLs in the security namespace will be retrieved if no optional parameters are provided.
+func (client *ClientImpl) QueryAccessControlLists(ctx context.Context, args QueryAccessControlListsArgs) (*[]AccessControlList, error) {
+ routeValues := make(map[string]string)
+ if args.SecurityNamespaceId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.SecurityNamespaceId"}
+ }
+ routeValues["securityNamespaceId"] = (*args.SecurityNamespaceId).String()
+
+ queryParams := url.Values{}
+ if args.Token != nil {
+ queryParams.Add("token", *args.Token)
+ }
+ if args.Descriptors != nil {
+ queryParams.Add("descriptors", *args.Descriptors)
+ }
+ if args.IncludeExtendedInfo != nil {
+ queryParams.Add("includeExtendedInfo", strconv.FormatBool(*args.IncludeExtendedInfo))
+ }
+ if args.Recurse != nil {
+ queryParams.Add("recurse", strconv.FormatBool(*args.Recurse))
+ }
+ locationId, _ := uuid.Parse("18a2ad18-7571-46ae-bec7-0c7da1495885")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []AccessControlList
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the QueryAccessControlLists function
+type QueryAccessControlListsArgs struct {
+ // (required) Security namespace identifier.
+ SecurityNamespaceId *uuid.UUID
+ // (optional) Security token
+ Token *string
+ // (optional) An optional filter string containing a list of identity descriptors separated by ',' whose ACEs should be retrieved. If this is left null, entire ACLs will be returned.
+ Descriptors *string
+ // (optional) If true, populate the extended information properties for the access control entries contained in the returned lists.
+ IncludeExtendedInfo *bool
+ // (optional) If true and this is a hierarchical namespace, return child ACLs of the specified token.
+ Recurse *bool
+}
+
+// List all security namespaces or just the specified namespace.
+func (client *ClientImpl) QuerySecurityNamespaces(ctx context.Context, args QuerySecurityNamespacesArgs) (*[]SecurityNamespaceDescription, error) {
+ routeValues := make(map[string]string)
+ if args.SecurityNamespaceId != nil {
+ routeValues["securityNamespaceId"] = (*args.SecurityNamespaceId).String()
+ }
+
+ queryParams := url.Values{}
+ if args.LocalOnly != nil {
+ queryParams.Add("localOnly", strconv.FormatBool(*args.LocalOnly))
+ }
+ locationId, _ := uuid.Parse("ce7b9f95-fde9-4be8-a86d-83b366f0b87a")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []SecurityNamespaceDescription
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the QuerySecurityNamespaces function
+type QuerySecurityNamespacesArgs struct {
+ // (optional) Security namespace identifier.
+ SecurityNamespaceId *uuid.UUID
+ // (optional) If true, retrieve only local security namespaces.
+ LocalOnly *bool
+}
+
+// Remove the specified ACEs from the ACL belonging to the specified token.
+func (client *ClientImpl) RemoveAccessControlEntries(ctx context.Context, args RemoveAccessControlEntriesArgs) (*bool, error) {
+ routeValues := make(map[string]string)
+ if args.SecurityNamespaceId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.SecurityNamespaceId"}
+ }
+ routeValues["securityNamespaceId"] = (*args.SecurityNamespaceId).String()
+
+ queryParams := url.Values{}
+ if args.Token != nil {
+ queryParams.Add("token", *args.Token)
+ }
+ if args.Descriptors != nil {
+ queryParams.Add("descriptors", *args.Descriptors)
+ }
+ locationId, _ := uuid.Parse("ac08c8ff-4323-4b08-af90-bcd018d380ce")
+ resp, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue bool
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the RemoveAccessControlEntries function
+type RemoveAccessControlEntriesArgs struct {
+ // (required) Security namespace identifier.
+ SecurityNamespaceId *uuid.UUID
+ // (optional) The token whose ACL should be modified.
+ Token *string
+ // (optional) String containing a list of identity descriptors separated by ',' whose entries should be removed.
+ Descriptors *string
+}
+
+// Remove access control lists under the specfied security namespace.
+func (client *ClientImpl) RemoveAccessControlLists(ctx context.Context, args RemoveAccessControlListsArgs) (*bool, error) {
+ routeValues := make(map[string]string)
+ if args.SecurityNamespaceId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.SecurityNamespaceId"}
+ }
+ routeValues["securityNamespaceId"] = (*args.SecurityNamespaceId).String()
+
+ queryParams := url.Values{}
+ if args.Tokens != nil {
+ queryParams.Add("tokens", *args.Tokens)
+ }
+ if args.Recurse != nil {
+ queryParams.Add("recurse", strconv.FormatBool(*args.Recurse))
+ }
+ locationId, _ := uuid.Parse("18a2ad18-7571-46ae-bec7-0c7da1495885")
+ resp, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue bool
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the RemoveAccessControlLists function
+type RemoveAccessControlListsArgs struct {
+ // (required) Security namespace identifier.
+ SecurityNamespaceId *uuid.UUID
+ // (optional) One or more comma-separated security tokens
+ Tokens *string
+ // (optional) If true and this is a hierarchical namespace, also remove child ACLs of the specified tokens.
+ Recurse *bool
+}
+
+// Removes the specified permissions on a security token for a user or group.
+func (client *ClientImpl) RemovePermission(ctx context.Context, args RemovePermissionArgs) (*AccessControlEntry, error) {
+ routeValues := make(map[string]string)
+ if args.SecurityNamespaceId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.SecurityNamespaceId"}
+ }
+ routeValues["securityNamespaceId"] = (*args.SecurityNamespaceId).String()
+ if args.Permissions != nil {
+ routeValues["permissions"] = strconv.Itoa(*args.Permissions)
+ }
+
+ queryParams := url.Values{}
+ if args.Descriptor == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "descriptor"}
+ }
+ queryParams.Add("descriptor", *args.Descriptor)
+ if args.Token != nil {
+ queryParams.Add("token", *args.Token)
+ }
+ locationId, _ := uuid.Parse("dd3b8bd6-c7fc-4cbd-929a-933d9c011c9d")
+ resp, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue AccessControlEntry
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the RemovePermission function
+type RemovePermissionArgs struct {
+ // (required) Security namespace identifier.
+ SecurityNamespaceId *uuid.UUID
+ // (required) Identity descriptor of the user to remove permissions for.
+ Descriptor *string
+ // (optional) Permissions to remove.
+ Permissions *int
+ // (optional) Security token to remove permissions for.
+ Token *string
+}
+
+// Add or update ACEs in the ACL for the provided token. The request body contains the target token, a list of [ACEs](https://docs.microsoft.com/en-us/rest/api/azure/devops/security/access%20control%20entries/set%20access%20control%20entries?#accesscontrolentry) and a optional merge parameter. In the case of a collision (by identity descriptor) with an existing ACE in the ACL, the "merge" parameter determines the behavior. If set, the existing ACE has its allow and deny merged with the incoming ACE's allow and deny. If unset, the existing ACE is displaced.
+func (client *ClientImpl) SetAccessControlEntries(ctx context.Context, args SetAccessControlEntriesArgs) (*[]AccessControlEntry, error) {
+ if args.Container == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.Container"}
+ }
+ routeValues := make(map[string]string)
+ if args.SecurityNamespaceId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.SecurityNamespaceId"}
+ }
+ routeValues["securityNamespaceId"] = (*args.SecurityNamespaceId).String()
+
+ body, marshalErr := json.Marshal(args.Container)
+ if marshalErr != nil {
+ return nil, marshalErr
+ }
+ locationId, _ := uuid.Parse("ac08c8ff-4323-4b08-af90-bcd018d380ce")
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []AccessControlEntry
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the SetAccessControlEntries function
+type SetAccessControlEntriesArgs struct {
+ // (required)
+ Container interface{}
+ // (required) Security namespace identifier.
+ SecurityNamespaceId *uuid.UUID
+}
+
+// Create or update one or more access control lists. All data that currently exists for the ACLs supplied will be overwritten.
+func (client *ClientImpl) SetAccessControlLists(ctx context.Context, args SetAccessControlListsArgs) error {
+ if args.AccessControlLists == nil {
+ return &azuredevops.ArgumentNilError{ArgumentName: "args.AccessControlLists"}
+ }
+ routeValues := make(map[string]string)
+ if args.SecurityNamespaceId == nil {
+ return &azuredevops.ArgumentNilError{ArgumentName: "args.SecurityNamespaceId"}
+ }
+ routeValues["securityNamespaceId"] = (*args.SecurityNamespaceId).String()
+
+ body, marshalErr := json.Marshal(*args.AccessControlLists)
+ if marshalErr != nil {
+ return marshalErr
+ }
+ locationId, _ := uuid.Parse("18a2ad18-7571-46ae-bec7-0c7da1495885")
+ _, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// Arguments for the SetAccessControlLists function
+type SetAccessControlListsArgs struct {
+ // (required) A list of ACLs to create or update.
+ AccessControlLists *azuredevops.VssJsonCollectionWrapper
+ // (required) Security namespace identifier.
+ SecurityNamespaceId *uuid.UUID
+}
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/security/models.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/security/models.go
new file mode 100644
index 000000000..7341ebcc1
--- /dev/null
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/security/models.go
@@ -0,0 +1,116 @@
+// --------------------------------------------------------------------------------------------
+// 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 security
+
+import (
+ "github.com/google/uuid"
+)
+
+// Class for encapsulating the allowed and denied permissions for a given IdentityDescriptor.
+type AccessControlEntry struct {
+ // The set of permission bits that represent the actions that the associated descriptor is allowed to perform.
+ Allow *int `json:"allow,omitempty"`
+ // The set of permission bits that represent the actions that the associated descriptor is not allowed to perform.
+ Deny *int `json:"deny,omitempty"`
+ // The descriptor for the user this AccessControlEntry applies to.
+ Descriptor *string `json:"descriptor,omitempty"`
+ // This value, when set, reports the inherited and effective information for the associated descriptor. This value is only set on AccessControlEntries returned by the QueryAccessControlList(s) call when its includeExtendedInfo parameter is set to true.
+ ExtendedInfo *AceExtendedInformation `json:"extendedInfo,omitempty"`
+}
+
+// The AccessControlList class is meant to associate a set of AccessControlEntries with a security token and its inheritance settings.
+type AccessControlList struct {
+ // Storage of permissions keyed on the identity the permission is for.
+ AcesDictionary *map[string]AccessControlEntry `json:"acesDictionary,omitempty"`
+ // True if this ACL holds ACEs that have extended information.
+ IncludeExtendedInfo *bool `json:"includeExtendedInfo,omitempty"`
+ // True if the given token inherits permissions from parents.
+ InheritPermissions *bool `json:"inheritPermissions,omitempty"`
+ // The token that this AccessControlList is for.
+ Token *string `json:"token,omitempty"`
+}
+
+// A list of AccessControlList. An AccessControlList is meant to associate a set of AccessControlEntries with a security token and its inheritance settings.
+type AccessControlListsCollection struct {
+}
+
+// Holds the inherited and effective permission information for a given AccessControlEntry.
+type AceExtendedInformation struct {
+ // This is the combination of all of the explicit and inherited permissions for this identity on this token. These are the permissions used when determining if a given user has permission to perform an action.
+ EffectiveAllow *int `json:"effectiveAllow,omitempty"`
+ // This is the combination of all of the explicit and inherited permissions for this identity on this token. These are the permissions used when determining if a given user has permission to perform an action.
+ EffectiveDeny *int `json:"effectiveDeny,omitempty"`
+ // These are the permissions that are inherited for this identity on this token. If the token does not inherit permissions this will be 0. Note that any permissions that have been explicitly set on this token for this identity, or any groups that this identity is a part of, are not included here.
+ InheritedAllow *int `json:"inheritedAllow,omitempty"`
+ // These are the permissions that are inherited for this identity on this token. If the token does not inherit permissions this will be 0. Note that any permissions that have been explicitly set on this token for this identity, or any groups that this identity is a part of, are not included here.
+ InheritedDeny *int `json:"inheritedDeny,omitempty"`
+}
+
+type ActionDefinition struct {
+ // The bit mask integer for this action. Must be a power of 2.
+ Bit *int `json:"bit,omitempty"`
+ // The localized display name for this action.
+ DisplayName *string `json:"displayName,omitempty"`
+ // The non-localized name for this action.
+ Name *string `json:"name,omitempty"`
+ // The namespace that this action belongs to. This will only be used for reading from the database.
+ NamespaceId *uuid.UUID `json:"namespaceId,omitempty"`
+}
+
+// Represents an evaluated permission.
+type PermissionEvaluation struct {
+ // Permission bit for this evaluated permission.
+ Permissions *int `json:"permissions,omitempty"`
+ // Security namespace identifier for this evaluated permission.
+ SecurityNamespaceId *uuid.UUID `json:"securityNamespaceId,omitempty"`
+ // Security namespace-specific token for this evaluated permission.
+ Token *string `json:"token,omitempty"`
+ // Permission evaluation value.
+ Value *bool `json:"value,omitempty"`
+}
+
+// Represents a set of evaluated permissions.
+type PermissionEvaluationBatch struct {
+ // True if members of the Administrators group should always pass the security check.
+ AlwaysAllowAdministrators *bool `json:"alwaysAllowAdministrators,omitempty"`
+ // Array of permission evaluations to evaluate.
+ Evaluations *[]PermissionEvaluation `json:"evaluations,omitempty"`
+}
+
+// Class for describing the details of a TeamFoundationSecurityNamespace.
+type SecurityNamespaceDescription struct {
+ // The list of actions that this Security Namespace is responsible for securing.
+ Actions *[]ActionDefinition `json:"actions,omitempty"`
+ // This is the dataspace category that describes where the security information for this SecurityNamespace should be stored.
+ DataspaceCategory *string `json:"dataspaceCategory,omitempty"`
+ // This localized name for this namespace.
+ DisplayName *string `json:"displayName,omitempty"`
+ // If the security tokens this namespace will be operating on need to be split on certain character lengths to determine its elements, that length should be specified here. If not, this value will be -1.
+ ElementLength *int `json:"elementLength,omitempty"`
+ // This is the type of the extension that should be loaded from the plugins directory for extending this security namespace.
+ ExtensionType *string `json:"extensionType,omitempty"`
+ // If true, the security namespace is remotable, allowing another service to proxy the namespace.
+ IsRemotable *bool `json:"isRemotable,omitempty"`
+ // This non-localized for this namespace.
+ Name *string `json:"name,omitempty"`
+ // The unique identifier for this namespace.
+ NamespaceId *uuid.UUID `json:"namespaceId,omitempty"`
+ // The permission bits needed by a user in order to read security data on the Security Namespace.
+ ReadPermission *int `json:"readPermission,omitempty"`
+ // If the security tokens this namespace will be operating on need to be split on certain characters to determine its elements that character should be specified here. If not, this value will be the null character.
+ SeparatorValue *string `json:"separatorValue,omitempty"`
+ // Used to send information about the structure of the security namespace over the web service.
+ StructureValue *int `json:"structureValue,omitempty"`
+ // The bits reserved by system store
+ SystemBitMask *int `json:"systemBitMask,omitempty"`
+ // If true, the security service will expect an ISecurityDataspaceTokenTranslator plugin to exist for this namespace
+ UseTokenTranslator *bool `json:"useTokenTranslator,omitempty"`
+ // The permission bits needed by a user in order to modify security data on the Security Namespace.
+ WritePermission *int `json:"writePermission,omitempty"`
+}
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/serviceendpoint/client.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/serviceendpoint/client.go
similarity index 74%
rename from vendor/github.com/microsoft/azure-devops-go-api/azuredevops/serviceendpoint/client.go
rename to vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/serviceendpoint/client.go
index 712619703..57dc0d3e3 100644
--- a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/serviceendpoint/client.go
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/serviceendpoint/client.go
@@ -13,7 +13,7 @@ import (
"context"
"encoding/json"
"github.com/google/uuid"
- "github.com/microsoft/azure-devops-go-api/azuredevops"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6"
"net/http"
"net/url"
"strconv"
@@ -23,9 +23,9 @@ import (
var ResourceAreaId, _ = uuid.Parse("1814ab31-2f4f-4a9f-8761-f4d77dc5a5d7")
type Client interface {
- // [Preview API] Create a service endpoint.
+ // [Preview API] Creates a new service endpoint
CreateServiceEndpoint(context.Context, CreateServiceEndpointArgs) (*ServiceEndpoint, error)
- // [Preview API] Delete a service endpoint.
+ // [Preview API] Delete a service endpoint
DeleteServiceEndpoint(context.Context, DeleteServiceEndpointArgs) error
// [Preview API] Proxy for a GET request defined by a service endpoint.
ExecuteServiceEndpointRequest(context.Context, ExecuteServiceEndpointRequestArgs) (*ServiceEndpointRequestResult, error)
@@ -37,9 +37,13 @@ type Client interface {
GetServiceEndpoints(context.Context, GetServiceEndpointsArgs) (*[]ServiceEndpoint, error)
// [Preview API] Get the service endpoints by name.
GetServiceEndpointsByNames(context.Context, GetServiceEndpointsByNamesArgs) (*[]ServiceEndpoint, error)
+ // [Preview API] Gets the service endpoints and patch new authorization parameters
+ GetServiceEndpointsWithRefreshedAuthentication(context.Context, GetServiceEndpointsWithRefreshedAuthenticationArgs) (*[]ServiceEndpoint, error)
// [Preview API] Get service endpoint types.
GetServiceEndpointTypes(context.Context, GetServiceEndpointTypesArgs) (*[]ServiceEndpointType, error)
- // [Preview API] Update a service endpoint.
+ // [Preview API] Share service endpoint across projects
+ ShareServiceEndpoint(context.Context, ShareServiceEndpointArgs) error
+ // [Preview API] Update the service endpoint
UpdateServiceEndpoint(context.Context, UpdateServiceEndpointArgs) (*ServiceEndpoint, error)
// [Preview API] Update the service endpoints.
UpdateServiceEndpoints(context.Context, UpdateServiceEndpointsArgs) (*[]ServiceEndpoint, error)
@@ -59,23 +63,17 @@ func NewClient(ctx context.Context, connection *azuredevops.Connection) (Client,
}, nil
}
-// [Preview API] Create a service endpoint.
+// [Preview API] Creates a new service endpoint
func (client *ClientImpl) CreateServiceEndpoint(ctx context.Context, args CreateServiceEndpointArgs) (*ServiceEndpoint, error) {
if args.Endpoint == nil {
return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.Endpoint"}
}
- routeValues := make(map[string]string)
- if args.Project == nil || *args.Project == "" {
- return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
- }
- routeValues["project"] = *args.Project
-
body, marshalErr := json.Marshal(*args.Endpoint)
if marshalErr != nil {
return nil, marshalErr
}
- locationId, _ := uuid.Parse("e85f1c62-adfc-4b74-b618-11a150fb195e")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.2", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ locationId, _ := uuid.Parse("14e48fdc-2c8b-41ce-a0c3-e26f6cc55bd0")
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.4", nil, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -87,30 +85,29 @@ func (client *ClientImpl) CreateServiceEndpoint(ctx context.Context, args Create
// Arguments for the CreateServiceEndpoint function
type CreateServiceEndpointArgs struct {
- // (required) Service endpoint to create.
+ // (required) Service endpoint to create
Endpoint *ServiceEndpoint
- // (required) Project ID or project name
- Project *string
}
-// [Preview API] Delete a service endpoint.
+// [Preview API] Delete a service endpoint
func (client *ClientImpl) DeleteServiceEndpoint(ctx context.Context, args DeleteServiceEndpointArgs) error {
routeValues := make(map[string]string)
- if args.Project == nil || *args.Project == "" {
- return &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
- }
- routeValues["project"] = *args.Project
if args.EndpointId == nil {
return &azuredevops.ArgumentNilError{ArgumentName: "args.EndpointId"}
}
routeValues["endpointId"] = (*args.EndpointId).String()
queryParams := url.Values{}
+ if args.ProjectIds == nil {
+ return &azuredevops.ArgumentNilError{ArgumentName: "projectIds"}
+ }
+ listAsString := strings.Join((*args.ProjectIds)[:], ",")
+ queryParams.Add("projectIds", listAsString)
if args.Deep != nil {
queryParams.Add("deep", strconv.FormatBool(*args.Deep))
}
- locationId, _ := uuid.Parse("e85f1c62-adfc-4b74-b618-11a150fb195e")
- _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1-preview.2", routeValues, queryParams, nil, "", "application/json", nil)
+ locationId, _ := uuid.Parse("14e48fdc-2c8b-41ce-a0c3-e26f6cc55bd0")
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0-preview.4", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return err
}
@@ -120,11 +117,11 @@ func (client *ClientImpl) DeleteServiceEndpoint(ctx context.Context, args Delete
// Arguments for the DeleteServiceEndpoint function
type DeleteServiceEndpointArgs struct {
- // (required) Project ID or project name
- Project *string
- // (required) Id of the service endpoint to delete.
+ // (required) Endpoint Id of endpoint to delete
EndpointId *uuid.UUID
- // (optional) Specific to AzureRM endpoint created in Automatic flow. When set to true, this will also delete corresponding AAD application in Azure. Default value is true.
+ // (required) project Ids from which endpoint needs to be deleted
+ ProjectIds *[]string
+ // (optional) delete the spn created by endpoint
Deep *bool
}
@@ -149,7 +146,7 @@ func (client *ClientImpl) ExecuteServiceEndpointRequest(ctx context.Context, arg
return nil, marshalErr
}
locationId, _ := uuid.Parse("cc63bb57-2a5f-4a7a-b79c-c142d308657e")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.1", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.1", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -181,8 +178,12 @@ func (client *ClientImpl) GetServiceEndpointDetails(ctx context.Context, args Ge
}
routeValues["endpointId"] = (*args.EndpointId).String()
+ queryParams := url.Values{}
+ if args.ActionFilter != nil {
+ queryParams.Add("actionFilter", string(*args.ActionFilter))
+ }
locationId, _ := uuid.Parse("e85f1c62-adfc-4b74-b618-11a150fb195e")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.2", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.4", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -198,6 +199,8 @@ type GetServiceEndpointDetailsArgs struct {
Project *string
// (required) Id of the service endpoint.
EndpointId *uuid.UUID
+ // (optional) Action filter for the service connection. It specifies the action which can be performed on the service connection.
+ ActionFilter *ServiceEndpointActionFilter
}
// [Preview API] Get service endpoint execution records.
@@ -220,7 +223,7 @@ func (client *ClientImpl) GetServiceEndpointExecutionRecords(ctx context.Context
queryParams.Add("continuationToken", strconv.FormatUint(*args.ContinuationToken, 10))
}
locationId, _ := uuid.Parse("10a16738-9299-4cd1-9a81-fd23ad6200d0")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -245,8 +248,7 @@ type GetServiceEndpointExecutionRecordsArgs struct {
// Return type for the GetServiceEndpointExecutionRecords function
type GetServiceEndpointExecutionRecordsResponseValue struct {
- Value []ServiceEndpointExecutionRecord
- // The continuation token to be used to get the next page of results.
+ Value []ServiceEndpointExecutionRecord
ContinuationToken string
}
@@ -284,7 +286,7 @@ func (client *ClientImpl) GetServiceEndpoints(ctx context.Context, args GetServi
queryParams.Add("includeDetails", strconv.FormatBool(*args.IncludeDetails))
}
locationId, _ := uuid.Parse("e85f1c62-adfc-4b74-b618-11a150fb195e")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.2", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.4", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -343,7 +345,7 @@ func (client *ClientImpl) GetServiceEndpointsByNames(ctx context.Context, args G
queryParams.Add("includeDetails", strconv.FormatBool(*args.IncludeDetails))
}
locationId, _ := uuid.Parse("e85f1c62-adfc-4b74-b618-11a150fb195e")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.2", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.4", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -371,6 +373,52 @@ type GetServiceEndpointsByNamesArgs struct {
IncludeDetails *bool
}
+// [Preview API] Gets the service endpoints and patch new authorization parameters
+func (client *ClientImpl) GetServiceEndpointsWithRefreshedAuthentication(ctx context.Context, args GetServiceEndpointsWithRefreshedAuthenticationArgs) (*[]ServiceEndpoint, error) {
+ if args.RefreshAuthenticationParameters == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.RefreshAuthenticationParameters"}
+ }
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+
+ queryParams := url.Values{}
+ if args.EndpointIds == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "endpointIds"}
+ }
+ var stringList []string
+ for _, item := range *args.EndpointIds {
+ stringList = append(stringList, item.String())
+ }
+ listAsString := strings.Join((stringList)[:], ",")
+ queryParams.Add("endpointIds", listAsString)
+ body, marshalErr := json.Marshal(*args.RefreshAuthenticationParameters)
+ if marshalErr != nil {
+ return nil, marshalErr
+ }
+ locationId, _ := uuid.Parse("e85f1c62-adfc-4b74-b618-11a150fb195e")
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.4", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []ServiceEndpoint
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetServiceEndpointsWithRefreshedAuthentication function
+type GetServiceEndpointsWithRefreshedAuthenticationArgs struct {
+ // (required) Scope, Validity of Token requested.
+ RefreshAuthenticationParameters *[]RefreshAuthenticationParameters
+ // (required) Project ID or project name
+ Project *string
+ // (required) Ids of the service endpoints.
+ EndpointIds *[]uuid.UUID
+}
+
// [Preview API] Get service endpoint types.
func (client *ClientImpl) GetServiceEndpointTypes(ctx context.Context, args GetServiceEndpointTypesArgs) (*[]ServiceEndpointType, error) {
queryParams := url.Values{}
@@ -381,7 +429,7 @@ func (client *ClientImpl) GetServiceEndpointTypes(ctx context.Context, args GetS
queryParams.Add("scheme", *args.Scheme)
}
locationId, _ := uuid.Parse("5a7938a4-655e-486c-b562-b78c54a7e87b")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", nil, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", nil, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -399,16 +447,44 @@ type GetServiceEndpointTypesArgs struct {
Scheme *string
}
-// [Preview API] Update a service endpoint.
+// [Preview API] Share service endpoint across projects
+func (client *ClientImpl) ShareServiceEndpoint(ctx context.Context, args ShareServiceEndpointArgs) error {
+ if args.EndpointProjectReferences == nil {
+ return &azuredevops.ArgumentNilError{ArgumentName: "args.EndpointProjectReferences"}
+ }
+ routeValues := make(map[string]string)
+ if args.EndpointId == nil {
+ return &azuredevops.ArgumentNilError{ArgumentName: "args.EndpointId"}
+ }
+ routeValues["endpointId"] = (*args.EndpointId).String()
+
+ body, marshalErr := json.Marshal(*args.EndpointProjectReferences)
+ if marshalErr != nil {
+ return marshalErr
+ }
+ locationId, _ := uuid.Parse("14e48fdc-2c8b-41ce-a0c3-e26f6cc55bd0")
+ _, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0-preview.4", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// Arguments for the ShareServiceEndpoint function
+type ShareServiceEndpointArgs struct {
+ // (required) Project reference details of the target project
+ EndpointProjectReferences *[]ServiceEndpointProjectReference
+ // (required) Endpoint Id of the endpoint to share
+ EndpointId *uuid.UUID
+}
+
+// [Preview API] Update the service endpoint
func (client *ClientImpl) UpdateServiceEndpoint(ctx context.Context, args UpdateServiceEndpointArgs) (*ServiceEndpoint, error) {
if args.Endpoint == nil {
return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.Endpoint"}
}
routeValues := make(map[string]string)
- if args.Project == nil || *args.Project == "" {
- return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
- }
- routeValues["project"] = *args.Project
if args.EndpointId == nil {
return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.EndpointId"}
}
@@ -422,8 +498,8 @@ func (client *ClientImpl) UpdateServiceEndpoint(ctx context.Context, args Update
if marshalErr != nil {
return nil, marshalErr
}
- locationId, _ := uuid.Parse("e85f1c62-adfc-4b74-b618-11a150fb195e")
- resp, err := client.Client.Send(ctx, http.MethodPut, locationId, "5.1-preview.2", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
+ locationId, _ := uuid.Parse("14e48fdc-2c8b-41ce-a0c3-e26f6cc55bd0")
+ resp, err := client.Client.Send(ctx, http.MethodPut, locationId, "6.0-preview.4", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -435,13 +511,11 @@ func (client *ClientImpl) UpdateServiceEndpoint(ctx context.Context, args Update
// Arguments for the UpdateServiceEndpoint function
type UpdateServiceEndpointArgs struct {
- // (required) Service endpoint to update.
+ // (required) Updated data for the endpoint
Endpoint *ServiceEndpoint
- // (required) Project ID or project name
- Project *string
- // (required) Id of the service endpoint to update.
+ // (required) Endpoint Id of the endpoint to update
EndpointId *uuid.UUID
- // (optional) Operation for the service endpoint.
+ // (optional) operation type
Operation *string
}
@@ -450,18 +524,12 @@ func (client *ClientImpl) UpdateServiceEndpoints(ctx context.Context, args Updat
if args.Endpoints == nil {
return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.Endpoints"}
}
- routeValues := make(map[string]string)
- if args.Project == nil || *args.Project == "" {
- return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
- }
- routeValues["project"] = *args.Project
-
body, marshalErr := json.Marshal(*args.Endpoints)
if marshalErr != nil {
return nil, marshalErr
}
- locationId, _ := uuid.Parse("e85f1c62-adfc-4b74-b618-11a150fb195e")
- resp, err := client.Client.Send(ctx, http.MethodPut, locationId, "5.1-preview.2", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ locationId, _ := uuid.Parse("14e48fdc-2c8b-41ce-a0c3-e26f6cc55bd0")
+ resp, err := client.Client.Send(ctx, http.MethodPut, locationId, "6.0-preview.4", nil, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -475,6 +543,4 @@ func (client *ClientImpl) UpdateServiceEndpoints(ctx context.Context, args Updat
type UpdateServiceEndpointsArgs struct {
// (required) Names of the service endpoints to update.
Endpoints *[]ServiceEndpoint
- // (required) Project ID or project name
- Project *string
}
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/serviceendpoint/models.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/serviceendpoint/models.go
similarity index 92%
rename from vendor/github.com/microsoft/azure-devops-go-api/azuredevops/serviceendpoint/models.go
rename to vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/serviceendpoint/models.go
index 8ed196271..000851dbc 100644
--- a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/serviceendpoint/models.go
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/serviceendpoint/models.go
@@ -10,10 +10,10 @@ package serviceendpoint
import (
"github.com/google/uuid"
- "github.com/microsoft/azure-devops-go-api/azuredevops"
- "github.com/microsoft/azure-devops-go-api/azuredevops/distributedtaskcommon"
- "github.com/microsoft/azure-devops-go-api/azuredevops/forminput"
- "github.com/microsoft/azure-devops-go-api/azuredevops/webapi"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/distributedtaskcommon"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/forminput"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/webapi"
)
type AadLoginPromptOption string
@@ -106,6 +106,11 @@ type AuthorizationHeader struct {
Value *string `json:"value,omitempty"`
}
+type AzureAppService struct {
+ Id *string `json:"id,omitempty"`
+ Name *string `json:"name,omitempty"`
+}
+
type AzureKeyVaultPermission struct {
Provisioned *bool `json:"provisioned,omitempty"`
ResourceProvider *string `json:"resourceProvider,omitempty"`
@@ -300,6 +305,8 @@ type EndpointUrl struct {
DependsOn *DependsOn `json:"dependsOn,omitempty"`
// Gets or sets the display name of service endpoint url.
DisplayName *string `json:"displayName,omitempty"`
+ // Gets or sets the format of the url.
+ Format *string `json:"format,omitempty"`
// Gets or sets the help text of service endpoint url.
HelpText *string `json:"helpText,omitempty"`
// Gets or sets the visibility of service endpoint url.
@@ -392,6 +399,16 @@ type ProjectReference struct {
Name *string `json:"name,omitempty"`
}
+// Specify the properties for refreshing the endpoint authentication object being queried
+type RefreshAuthenticationParameters struct {
+ // EndpointId which needs new authentication params
+ EndpointId *uuid.UUID `json:"endpointId,omitempty"`
+ // Scope of the token requested. For GitHub marketplace apps, scope contains repository Ids
+ Scope *[]int `json:"scope,omitempty"`
+ // The requested endpoint authentication should be valid for _ minutes. Authentication params will not be refreshed if the token contained in endpoint already has active token.
+ TokenValidityInMinutes *int `json:"tokenValidityInMinutes,omitempty"`
+}
+
// Represents template to transform the result data.
type ResultTransformationDetails struct {
// Gets or sets the template for callback parameters
@@ -429,6 +446,8 @@ type ServiceEndpoint struct {
Owner *string `json:"owner,omitempty"`
// Gets or sets the identity reference for the readers group of the service endpoint.
ReadersGroup *webapi.IdentityRef `json:"readersGroup,omitempty"`
+ // All other project references where the service endpoint is shared.
+ ServiceEndpointProjectReferences *[]ServiceEndpointProjectReference `json:"serviceEndpointProjectReferences,omitempty"`
// Gets or sets the type of the endpoint.
Type *string `json:"type,omitempty"`
// Gets or sets the url of the endpoint.
@@ -442,12 +461,14 @@ type serviceEndpointActionFilterValuesType struct {
None ServiceEndpointActionFilter
Manage ServiceEndpointActionFilter
Use ServiceEndpointActionFilter
+ View ServiceEndpointActionFilter
}
var ServiceEndpointActionFilterValues = serviceEndpointActionFilterValuesType{
None: "none",
Manage: "manage",
Use: "use",
+ View: "view",
}
// Represents the authentication scheme used to authenticate the endpoint.
@@ -464,6 +485,10 @@ type ServiceEndpointAuthenticationScheme struct {
DisplayName *string `json:"displayName,omitempty"`
// Gets or sets the input descriptors for the service endpoint authentication scheme.
InputDescriptors *[]forminput.InputDescriptor `json:"inputDescriptors,omitempty"`
+ // Gets or sets the properties of service endpoint authentication scheme.
+ Properties *map[string]string `json:"properties,omitempty"`
+ // Gets or sets whether this auth scheme requires OAuth2 configuration or not.
+ RequiresOAuth2Configuration *bool `json:"requiresOAuth2Configuration,omitempty"`
// Gets or sets the scheme for service endpoint authentication.
Scheme *string `json:"scheme,omitempty"`
}
@@ -552,6 +577,15 @@ type ServiceEndpointOAuthConfigurationReference struct {
ServiceEndpointProjectId *uuid.UUID `json:"serviceEndpointProjectId,omitempty"`
}
+type ServiceEndpointProjectReference struct {
+ // Gets or sets description of the service endpoint.
+ Description *string `json:"description,omitempty"`
+ // Gets or sets name of the service endpoint.
+ Name *string `json:"name,omitempty"`
+ // Gets or sets project reference of the service endpoint.
+ ProjectReference *ProjectReference `json:"projectReference,omitempty"`
+}
+
type ServiceEndpointRequest struct {
// Gets or sets the data source details for the service endpoint request.
DataSourceDetails *DataSourceDetails `json:"dataSourceDetails,omitempty"`
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/system/models.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/system/models.go
new file mode 100644
index 000000000..245ca996a
--- /dev/null
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/system/models.go
@@ -0,0 +1,97 @@
+// --------------------------------------------------------------------------------------------
+// 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 system
+
+type SqlDbType string
+
+type sqlDbTypeValuesType struct {
+ BigInt SqlDbType
+ Binary SqlDbType
+ Bit SqlDbType
+ Char SqlDbType
+ DateTime SqlDbType
+ Decimal SqlDbType
+ Float SqlDbType
+ Image SqlDbType
+ Int SqlDbType
+ Money SqlDbType
+ NChar SqlDbType
+ NText SqlDbType
+ NVarChar SqlDbType
+ Real SqlDbType
+ UniqueIdentifier SqlDbType
+ SmallDateTime SqlDbType
+ SmallInt SqlDbType
+ SmallMoney SqlDbType
+ Text SqlDbType
+ Timestamp SqlDbType
+ TinyInt SqlDbType
+ VarBinary SqlDbType
+ VarChar SqlDbType
+ Variant SqlDbType
+ Xml SqlDbType
+ Udt SqlDbType
+ Structured SqlDbType
+ Date SqlDbType
+ Time SqlDbType
+ DateTime2 SqlDbType
+ DateTimeOffset SqlDbType
+}
+
+var SqlDbTypeValues = sqlDbTypeValuesType{
+ BigInt: "bigInt",
+ Binary: "binary",
+ Bit: "bit",
+ Char: "char",
+ DateTime: "dateTime",
+ Decimal: "decimal",
+ Float: "float",
+ Image: "image",
+ Int: "int",
+ Money: "money",
+ NChar: "nChar",
+ NText: "nText",
+ NVarChar: "nVarChar",
+ Real: "real",
+ UniqueIdentifier: "uniqueIdentifier",
+ SmallDateTime: "smallDateTime",
+ SmallInt: "smallInt",
+ SmallMoney: "smallMoney",
+ Text: "text",
+ Timestamp: "timestamp",
+ TinyInt: "tinyInt",
+ VarBinary: "varBinary",
+ VarChar: "varChar",
+ Variant: "variant",
+ Xml: "xml",
+ Udt: "udt",
+ Structured: "structured",
+ Date: "date",
+ Time: "time",
+ DateTime2: "dateTime2",
+ DateTimeOffset: "dateTimeOffset",
+}
+
+type TraceLevel string
+
+type traceLevelValuesType struct {
+ Off TraceLevel
+ Error TraceLevel
+ Warning TraceLevel
+ Info TraceLevel
+ Verbose TraceLevel
+}
+
+var TraceLevelValues = traceLevelValuesType{
+ Off: "off",
+ Error: "error",
+ Warning: "warning",
+ Info: "info",
+ Verbose: "verbose",
+}
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/taskagent/client.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/taskagent/client.go
similarity index 71%
rename from vendor/github.com/microsoft/azure-devops-go-api/azuredevops/taskagent/client.go
rename to vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/taskagent/client.go
index 672ab3d27..4871197de 100644
--- a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/taskagent/client.go
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/taskagent/client.go
@@ -13,7 +13,7 @@ import (
"context"
"encoding/json"
"github.com/google/uuid"
- "github.com/microsoft/azure-devops-go-api/azuredevops"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6"
"net/http"
"net/url"
"strconv"
@@ -33,6 +33,10 @@ type Client interface {
AddAgentQueue(context.Context, AddAgentQueueArgs) (*TaskAgentQueue, error)
// [Preview API] Create a deployment group.
AddDeploymentGroup(context.Context, AddDeploymentGroupArgs) (*DeploymentGroup, error)
+ // [Preview API] Create an environment.
+ AddEnvironment(context.Context, AddEnvironmentArgs) (*EnvironmentInstance, error)
+ // [Preview API]
+ AddKubernetesResource(context.Context, AddKubernetesResourceArgs) (*KubernetesResource, error)
// [Preview API] Create a task group.
AddTaskGroup(context.Context, AddTaskGroupArgs) (*TaskGroup, error)
// [Preview API] Add a variable group.
@@ -49,6 +53,10 @@ type Client interface {
DeleteDeploymentGroup(context.Context, DeleteDeploymentGroupArgs) error
// [Preview API] Delete a deployment target in a deployment group. This deletes the agent from associated deployment pool too.
DeleteDeploymentTarget(context.Context, DeleteDeploymentTargetArgs) error
+ // [Preview API] Delete the specified environment.
+ DeleteEnvironment(context.Context, DeleteEnvironmentArgs) error
+ // [Preview API]
+ DeleteKubernetesResource(context.Context, DeleteKubernetesResourceArgs) error
// [Preview API] Delete a task group.
DeleteTaskGroup(context.Context, DeleteTaskGroupArgs) error
// [Preview API] Delete a variable group
@@ -77,6 +85,8 @@ type Client interface {
GetAgentQueuesByIds(context.Context, GetAgentQueuesByIdsArgs) (*[]TaskAgentQueue, error)
// [Preview API] Get a list of agent queues by their names
GetAgentQueuesByNames(context.Context, GetAgentQueuesByNamesArgs) (*[]TaskAgentQueue, error)
+ // [Preview API] Get a list of agent queues by pool ids
+ GetAgentQueuesForPools(context.Context, GetAgentQueuesForPoolsArgs) (*[]TaskAgentQueue, error)
// Get a list of agents.
GetAgents(context.Context, GetAgentsArgs) (*[]TaskAgent, error)
// [Preview API] Get a deployment group by its ID.
@@ -87,6 +97,14 @@ type Client interface {
GetDeploymentTarget(context.Context, GetDeploymentTargetArgs) (*DeploymentMachine, error)
// [Preview API] Get a list of deployment targets in a deployment group.
GetDeploymentTargets(context.Context, GetDeploymentTargetsArgs) (*GetDeploymentTargetsResponseValue, error)
+ // [Preview API] Get an environment by its ID.
+ GetEnvironmentById(context.Context, GetEnvironmentByIdArgs) (*EnvironmentInstance, error)
+ // [Preview API] Get environment deployment execution history
+ GetEnvironmentDeploymentExecutionRecords(context.Context, GetEnvironmentDeploymentExecutionRecordsArgs) (*GetEnvironmentDeploymentExecutionRecordsResponseValue, error)
+ // [Preview API] Get all environments.
+ GetEnvironments(context.Context, GetEnvironmentsArgs) (*GetEnvironmentsResponseValue, error)
+ // [Preview API]
+ GetKubernetesResource(context.Context, GetKubernetesResourceArgs) (*KubernetesResource, error)
// [Preview API] List task groups.
GetTaskGroups(context.Context, GetTaskGroupsArgs) (*[]TaskGroup, error)
// [Preview API] Get a variable group.
@@ -95,21 +113,32 @@ type Client interface {
GetVariableGroups(context.Context, GetVariableGroupsArgs) (*[]VariableGroup, error)
// [Preview API] Get variable groups by ids.
GetVariableGroupsById(context.Context, GetVariableGroupsByIdArgs) (*[]VariableGroup, error)
+ // [Preview API]
+ GetVirtualMachines(context.Context, GetVirtualMachinesArgs) (*GetVirtualMachinesResponseValue, error)
+ // GET the Yaml schema used for Yaml file validation.
GetYamlSchema(context.Context, GetYamlSchemaArgs) (interface{}, error)
// Replace an agent. You probably don't want to call this endpoint directly. Instead, [use the agent configuration script](https://docs.microsoft.com/azure/devops/pipelines/agents/agents) to remove and reconfigure an agent from your organization.
ReplaceAgent(context.Context, ReplaceAgentArgs) (*TaskAgent, error)
+ // [Preview API] Add a variable group.
+ ShareVariableGroup(context.Context, ShareVariableGroupArgs) error
// Update agent details.
UpdateAgent(context.Context, UpdateAgentArgs) (*TaskAgent, error)
+ // [Preview API]
+ UpdateAgentCloud(context.Context, UpdateAgentCloudArgs) (*TaskAgentCloud, error)
// Update properties on an agent pool
UpdateAgentPool(context.Context, UpdateAgentPoolArgs) (*TaskAgentPool, error)
// [Preview API] Update a deployment group.
UpdateDeploymentGroup(context.Context, UpdateDeploymentGroupArgs) (*DeploymentGroup, error)
// [Preview API] Update tags of a list of deployment targets in a deployment group.
UpdateDeploymentTargets(context.Context, UpdateDeploymentTargetsArgs) (*[]DeploymentMachine, error)
+ // [Preview API] Update the specified environment.
+ UpdateEnvironment(context.Context, UpdateEnvironmentArgs) (*EnvironmentInstance, error)
// [Preview API] Update a task group.
UpdateTaskGroup(context.Context, UpdateTaskGroupArgs) (*TaskGroup, error)
// [Preview API] Update a variable group.
UpdateVariableGroup(context.Context, UpdateVariableGroupArgs) (*VariableGroup, error)
+ // [Preview API]
+ UpdateVirtualMachines(context.Context, UpdateVirtualMachinesArgs) (*[]VirtualMachine, error)
}
type ClientImpl struct {
@@ -142,7 +171,7 @@ func (client *ClientImpl) AddAgent(ctx context.Context, args AddAgentArgs) (*Tas
return nil, marshalErr
}
locationId, _ := uuid.Parse("e298ef32-5878-4cab-993c-043836571f42")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -170,7 +199,7 @@ func (client *ClientImpl) AddAgentCloud(ctx context.Context, args AddAgentCloudA
return nil, marshalErr
}
locationId, _ := uuid.Parse("bfa72b3d-0fc6-43fb-932b-a7f6559f93b9")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.1", nil, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.1", nil, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -196,7 +225,7 @@ func (client *ClientImpl) AddAgentPool(ctx context.Context, args AddAgentPoolArg
return nil, marshalErr
}
locationId, _ := uuid.Parse("a8c47e17-4d56-4a56-92bb-de7ea7dc65be")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1", nil, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0", nil, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -231,7 +260,7 @@ func (client *ClientImpl) AddAgentQueue(ctx context.Context, args AddAgentQueueA
return nil, marshalErr
}
locationId, _ := uuid.Parse("900fa995-c559-4923-aae7-f8424fe4fbea")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.1", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.1", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -267,7 +296,7 @@ func (client *ClientImpl) AddDeploymentGroup(ctx context.Context, args AddDeploy
return nil, marshalErr
}
locationId, _ := uuid.Parse("083c4d89-ab35-45af-aa11-7cf66895c53e")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -285,6 +314,80 @@ type AddDeploymentGroupArgs struct {
Project *string
}
+// [Preview API] Create an environment.
+func (client *ClientImpl) AddEnvironment(ctx context.Context, args AddEnvironmentArgs) (*EnvironmentInstance, error) {
+ if args.EnvironmentCreateParameter == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.EnvironmentCreateParameter"}
+ }
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+
+ body, marshalErr := json.Marshal(*args.EnvironmentCreateParameter)
+ if marshalErr != nil {
+ return nil, marshalErr
+ }
+ locationId, _ := uuid.Parse("8572b1fc-2482-47fa-8f74-7e3ed53ee54b")
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue EnvironmentInstance
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the AddEnvironment function
+type AddEnvironmentArgs struct {
+ // (required) Environment to create.
+ EnvironmentCreateParameter *EnvironmentCreateParameter
+ // (required) Project ID or project name
+ Project *string
+}
+
+// [Preview API]
+func (client *ClientImpl) AddKubernetesResource(ctx context.Context, args AddKubernetesResourceArgs) (*KubernetesResource, error) {
+ if args.CreateParameters == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.CreateParameters"}
+ }
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.EnvironmentId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.EnvironmentId"}
+ }
+ routeValues["environmentId"] = strconv.Itoa(*args.EnvironmentId)
+
+ body, marshalErr := json.Marshal(*args.CreateParameters)
+ if marshalErr != nil {
+ return nil, marshalErr
+ }
+ locationId, _ := uuid.Parse("73fba52f-15ab-42b3-a538-ce67a9223a04")
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue KubernetesResource
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the AddKubernetesResource function
+type AddKubernetesResourceArgs struct {
+ // (required)
+ CreateParameters *KubernetesResourceCreateParameters
+ // (required) Project ID or project name
+ Project *string
+ // (required)
+ EnvironmentId *int
+}
+
// [Preview API] Create a task group.
func (client *ClientImpl) AddTaskGroup(ctx context.Context, args AddTaskGroupArgs) (*TaskGroup, error) {
if args.TaskGroup == nil {
@@ -301,7 +404,7 @@ func (client *ClientImpl) AddTaskGroup(ctx context.Context, args AddTaskGroupArg
return nil, marshalErr
}
locationId, _ := uuid.Parse("6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -321,21 +424,15 @@ type AddTaskGroupArgs struct {
// [Preview API] Add a variable group.
func (client *ClientImpl) AddVariableGroup(ctx context.Context, args AddVariableGroupArgs) (*VariableGroup, error) {
- if args.Group == nil {
- return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.Group"}
+ if args.VariableGroupParameters == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.VariableGroupParameters"}
}
- routeValues := make(map[string]string)
- if args.Project == nil || *args.Project == "" {
- return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
- }
- routeValues["project"] = *args.Project
-
- body, marshalErr := json.Marshal(*args.Group)
+ body, marshalErr := json.Marshal(*args.VariableGroupParameters)
if marshalErr != nil {
return nil, marshalErr
}
- locationId, _ := uuid.Parse("f5b09dd5-9d54-45a1-8b5a-1c8287d634cc")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ locationId, _ := uuid.Parse("ef5b7057-ffc3-4c77-bbad-c10b4a4abcc7")
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.2", nil, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -347,10 +444,8 @@ func (client *ClientImpl) AddVariableGroup(ctx context.Context, args AddVariable
// Arguments for the AddVariableGroup function
type AddVariableGroupArgs struct {
- // (required) Variable group to add.
- Group *VariableGroupParameters
- // (required) Project ID or project name
- Project *string
+ // (required)
+ VariableGroupParameters *VariableGroupParameters
}
// Delete an agent. You probably don't want to call this endpoint directly. Instead, [use the agent configuration script](https://docs.microsoft.com/azure/devops/pipelines/agents/agents) to remove an agent from your organization.
@@ -366,7 +461,7 @@ func (client *ClientImpl) DeleteAgent(ctx context.Context, args DeleteAgentArgs)
routeValues["agentId"] = strconv.Itoa(*args.AgentId)
locationId, _ := uuid.Parse("e298ef32-5878-4cab-993c-043836571f42")
- _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return err
}
@@ -391,7 +486,7 @@ func (client *ClientImpl) DeleteAgentCloud(ctx context.Context, args DeleteAgent
routeValues["agentCloudId"] = strconv.Itoa(*args.AgentCloudId)
locationId, _ := uuid.Parse("bfa72b3d-0fc6-43fb-932b-a7f6559f93b9")
- resp, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -416,7 +511,7 @@ func (client *ClientImpl) DeleteAgentPool(ctx context.Context, args DeleteAgentP
routeValues["poolId"] = strconv.Itoa(*args.PoolId)
locationId, _ := uuid.Parse("a8c47e17-4d56-4a56-92bb-de7ea7dc65be")
- _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return err
}
@@ -442,7 +537,7 @@ func (client *ClientImpl) DeleteAgentQueue(ctx context.Context, args DeleteAgent
routeValues["queueId"] = strconv.Itoa(*args.QueueId)
locationId, _ := uuid.Parse("900fa995-c559-4923-aae7-f8424fe4fbea")
- _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return err
}
@@ -471,7 +566,7 @@ func (client *ClientImpl) DeleteDeploymentGroup(ctx context.Context, args Delete
routeValues["deploymentGroupId"] = strconv.Itoa(*args.DeploymentGroupId)
locationId, _ := uuid.Parse("083c4d89-ab35-45af-aa11-7cf66895c53e")
- _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return err
}
@@ -504,7 +599,7 @@ func (client *ClientImpl) DeleteDeploymentTarget(ctx context.Context, args Delet
routeValues["targetId"] = strconv.Itoa(*args.TargetId)
locationId, _ := uuid.Parse("2f0aa599-c121-4256-a5fd-ba370e0ae7b6")
- _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return err
}
@@ -522,6 +617,70 @@ type DeleteDeploymentTargetArgs struct {
TargetId *int
}
+// [Preview API] Delete the specified environment.
+func (client *ClientImpl) DeleteEnvironment(ctx context.Context, args DeleteEnvironmentArgs) error {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.EnvironmentId == nil {
+ return &azuredevops.ArgumentNilError{ArgumentName: "args.EnvironmentId"}
+ }
+ routeValues["environmentId"] = strconv.Itoa(*args.EnvironmentId)
+
+ locationId, _ := uuid.Parse("8572b1fc-2482-47fa-8f74-7e3ed53ee54b")
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// Arguments for the DeleteEnvironment function
+type DeleteEnvironmentArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (required) ID of the environment.
+ EnvironmentId *int
+}
+
+// [Preview API]
+func (client *ClientImpl) DeleteKubernetesResource(ctx context.Context, args DeleteKubernetesResourceArgs) error {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.EnvironmentId == nil {
+ return &azuredevops.ArgumentNilError{ArgumentName: "args.EnvironmentId"}
+ }
+ routeValues["environmentId"] = strconv.Itoa(*args.EnvironmentId)
+ if args.ResourceId == nil {
+ return &azuredevops.ArgumentNilError{ArgumentName: "args.ResourceId"}
+ }
+ routeValues["resourceId"] = strconv.Itoa(*args.ResourceId)
+
+ locationId, _ := uuid.Parse("73fba52f-15ab-42b3-a538-ce67a9223a04")
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// Arguments for the DeleteKubernetesResource function
+type DeleteKubernetesResourceArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (required)
+ EnvironmentId *int
+ // (required)
+ ResourceId *int
+}
+
// [Preview API] Delete a task group.
func (client *ClientImpl) DeleteTaskGroup(ctx context.Context, args DeleteTaskGroupArgs) error {
routeValues := make(map[string]string)
@@ -539,7 +698,7 @@ func (client *ClientImpl) DeleteTaskGroup(ctx context.Context, args DeleteTaskGr
queryParams.Add("comment", *args.Comment)
}
locationId, _ := uuid.Parse("6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7")
- _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return err
}
@@ -560,17 +719,19 @@ type DeleteTaskGroupArgs struct {
// [Preview API] Delete a variable group
func (client *ClientImpl) DeleteVariableGroup(ctx context.Context, args DeleteVariableGroupArgs) error {
routeValues := make(map[string]string)
- if args.Project == nil || *args.Project == "" {
- return &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
- }
- routeValues["project"] = *args.Project
if args.GroupId == nil {
return &azuredevops.ArgumentNilError{ArgumentName: "args.GroupId"}
}
routeValues["groupId"] = strconv.Itoa(*args.GroupId)
- locationId, _ := uuid.Parse("f5b09dd5-9d54-45a1-8b5a-1c8287d634cc")
- _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ queryParams := url.Values{}
+ if args.ProjectIds == nil {
+ return &azuredevops.ArgumentNilError{ArgumentName: "projectIds"}
+ }
+ listAsString := strings.Join((*args.ProjectIds)[:], ",")
+ queryParams.Add("projectIds", listAsString)
+ locationId, _ := uuid.Parse("ef5b7057-ffc3-4c77-bbad-c10b4a4abcc7")
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0-preview.2", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return err
}
@@ -580,10 +741,10 @@ func (client *ClientImpl) DeleteVariableGroup(ctx context.Context, args DeleteVa
// Arguments for the DeleteVariableGroup function
type DeleteVariableGroupArgs struct {
- // (required) Project ID or project name
- Project *string
// (required) Id of the variable group.
GroupId *int
+ // (required)
+ ProjectIds *[]string
}
// Get information about an agent.
@@ -613,7 +774,7 @@ func (client *ClientImpl) GetAgent(ctx context.Context, args GetAgentArgs) (*Tas
queryParams.Add("propertyFilters", listAsString)
}
locationId, _ := uuid.Parse("e298ef32-5878-4cab-993c-043836571f42")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -648,7 +809,7 @@ func (client *ClientImpl) GetAgentCloud(ctx context.Context, args GetAgentCloudA
routeValues["agentCloudId"] = strconv.Itoa(*args.AgentCloudId)
locationId, _ := uuid.Parse("bfa72b3d-0fc6-43fb-932b-a7f6559f93b9")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -673,7 +834,7 @@ func (client *ClientImpl) GetAgentCloudRequests(ctx context.Context, args GetAge
routeValues["agentCloudId"] = strconv.Itoa(*args.AgentCloudId)
locationId, _ := uuid.Parse("20189bd7-5134-49c2-b8e9-f9e856eea2b2")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -692,7 +853,7 @@ type GetAgentCloudRequestsArgs struct {
// [Preview API]
func (client *ClientImpl) GetAgentClouds(ctx context.Context, args GetAgentCloudsArgs) (*[]TaskAgentCloud, error) {
locationId, _ := uuid.Parse("bfa72b3d-0fc6-43fb-932b-a7f6559f93b9")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", nil, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", nil, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -709,7 +870,7 @@ type GetAgentCloudsArgs struct {
// [Preview API] Get agent cloud types.
func (client *ClientImpl) GetAgentCloudTypes(ctx context.Context, args GetAgentCloudTypesArgs) (*[]TaskAgentCloudType, error) {
locationId, _ := uuid.Parse("5932e193-f376-469d-9c3e-e5588ce12cb5")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", nil, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", nil, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -740,7 +901,7 @@ func (client *ClientImpl) GetAgentPool(ctx context.Context, args GetAgentPoolArg
queryParams.Add("actionFilter", string(*args.ActionFilter))
}
locationId, _ := uuid.Parse("a8c47e17-4d56-4a56-92bb-de7ea7dc65be")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -777,7 +938,7 @@ func (client *ClientImpl) GetAgentPools(ctx context.Context, args GetAgentPoolsA
queryParams.Add("actionFilter", string(*args.ActionFilter))
}
locationId, _ := uuid.Parse("a8c47e17-4d56-4a56-92bb-de7ea7dc65be")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", nil, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", nil, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -815,7 +976,7 @@ func (client *ClientImpl) GetAgentPoolsByIds(ctx context.Context, args GetAgentP
queryParams.Add("actionFilter", string(*args.ActionFilter))
}
locationId, _ := uuid.Parse("a8c47e17-4d56-4a56-92bb-de7ea7dc65be")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", nil, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", nil, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -849,7 +1010,7 @@ func (client *ClientImpl) GetAgentQueue(ctx context.Context, args GetAgentQueueA
queryParams.Add("actionFilter", string(*args.ActionFilter))
}
locationId, _ := uuid.Parse("900fa995-c559-4923-aae7-f8424fe4fbea")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -884,7 +1045,7 @@ func (client *ClientImpl) GetAgentQueues(ctx context.Context, args GetAgentQueue
queryParams.Add("actionFilter", string(*args.ActionFilter))
}
locationId, _ := uuid.Parse("900fa995-c559-4923-aae7-f8424fe4fbea")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -925,7 +1086,7 @@ func (client *ClientImpl) GetAgentQueuesByIds(ctx context.Context, args GetAgent
queryParams.Add("actionFilter", string(*args.ActionFilter))
}
locationId, _ := uuid.Parse("900fa995-c559-4923-aae7-f8424fe4fbea")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -962,7 +1123,7 @@ func (client *ClientImpl) GetAgentQueuesByNames(ctx context.Context, args GetAge
queryParams.Add("actionFilter", string(*args.ActionFilter))
}
locationId, _ := uuid.Parse("900fa995-c559-4923-aae7-f8424fe4fbea")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -982,6 +1143,47 @@ type GetAgentQueuesByNamesArgs struct {
ActionFilter *TaskAgentQueueActionFilter
}
+// [Preview API] Get a list of agent queues by pool ids
+func (client *ClientImpl) GetAgentQueuesForPools(ctx context.Context, args GetAgentQueuesForPoolsArgs) (*[]TaskAgentQueue, error) {
+ routeValues := make(map[string]string)
+ if args.Project != nil && *args.Project != "" {
+ routeValues["project"] = *args.Project
+ }
+
+ queryParams := url.Values{}
+ if args.PoolIds == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "poolIds"}
+ }
+ var stringList []string
+ for _, item := range *args.PoolIds {
+ stringList = append(stringList, strconv.Itoa(item))
+ }
+ listAsString := strings.Join((stringList)[:], ",")
+ queryParams.Add("poolIds", listAsString)
+ if args.ActionFilter != nil {
+ queryParams.Add("actionFilter", string(*args.ActionFilter))
+ }
+ locationId, _ := uuid.Parse("900fa995-c559-4923-aae7-f8424fe4fbea")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []TaskAgentQueue
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetAgentQueuesForPools function
+type GetAgentQueuesForPoolsArgs struct {
+ // (required) A comma-separated list of pool ids to get the corresponding queues for
+ PoolIds *[]int
+ // (optional) Project ID or project name
+ Project *string
+ // (optional) Filter by whether the calling user has use or manage permissions
+ ActionFilter *TaskAgentQueueActionFilter
+}
+
// Get a list of agents.
func (client *ClientImpl) GetAgents(ctx context.Context, args GetAgentsArgs) (*[]TaskAgent, error) {
routeValues := make(map[string]string)
@@ -1012,7 +1214,7 @@ func (client *ClientImpl) GetAgents(ctx context.Context, args GetAgentsArgs) (*[
queryParams.Add("demands", listAsString)
}
locationId, _ := uuid.Parse("e298ef32-5878-4cab-993c-043836571f42")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1060,7 +1262,7 @@ func (client *ClientImpl) GetDeploymentGroup(ctx context.Context, args GetDeploy
queryParams.Add("$expand", string(*args.Expand))
}
locationId, _ := uuid.Parse("083c4d89-ab35-45af-aa11-7cf66895c53e")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1115,7 +1317,7 @@ func (client *ClientImpl) GetDeploymentGroups(ctx context.Context, args GetDeplo
queryParams.Add("ids", listAsString)
}
locationId, _ := uuid.Parse("083c4d89-ab35-45af-aa11-7cf66895c53e")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1146,8 +1348,7 @@ type GetDeploymentGroupsArgs struct {
// Return type for the GetDeploymentGroups function
type GetDeploymentGroupsResponseValue struct {
- Value []DeploymentGroup
- // The continuation token to be used to get the next page of results.
+ Value []DeploymentGroup
ContinuationToken string
}
@@ -1172,7 +1373,7 @@ func (client *ClientImpl) GetDeploymentTarget(ctx context.Context, args GetDeplo
queryParams.Add("$expand", string(*args.Expand))
}
locationId, _ := uuid.Parse("2f0aa599-c121-4256-a5fd-ba370e0ae7b6")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1240,7 +1441,7 @@ func (client *ClientImpl) GetDeploymentTargets(ctx context.Context, args GetDepl
queryParams.Add("propertyFilters", listAsString)
}
locationId, _ := uuid.Parse("2f0aa599-c121-4256-a5fd-ba370e0ae7b6")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1281,11 +1482,181 @@ type GetDeploymentTargetsArgs struct {
// Return type for the GetDeploymentTargets function
type GetDeploymentTargetsResponseValue struct {
- Value []DeploymentMachine
- // The continuation token to be used to get the next page of results.
+ Value []DeploymentMachine
+ ContinuationToken string
+}
+
+// [Preview API] Get an environment by its ID.
+func (client *ClientImpl) GetEnvironmentById(ctx context.Context, args GetEnvironmentByIdArgs) (*EnvironmentInstance, error) {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.EnvironmentId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.EnvironmentId"}
+ }
+ routeValues["environmentId"] = strconv.Itoa(*args.EnvironmentId)
+
+ queryParams := url.Values{}
+ if args.Expands != nil {
+ queryParams.Add("expands", string(*args.Expands))
+ }
+ locationId, _ := uuid.Parse("8572b1fc-2482-47fa-8f74-7e3ed53ee54b")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue EnvironmentInstance
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetEnvironmentById function
+type GetEnvironmentByIdArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (required) ID of the environment.
+ EnvironmentId *int
+ // (optional) Include these additional details in the returned objects.
+ Expands *EnvironmentExpands
+}
+
+// [Preview API] Get environment deployment execution history
+func (client *ClientImpl) GetEnvironmentDeploymentExecutionRecords(ctx context.Context, args GetEnvironmentDeploymentExecutionRecordsArgs) (*GetEnvironmentDeploymentExecutionRecordsResponseValue, error) {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.EnvironmentId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.EnvironmentId"}
+ }
+ routeValues["environmentId"] = strconv.Itoa(*args.EnvironmentId)
+
+ queryParams := url.Values{}
+ if args.ContinuationToken != nil {
+ queryParams.Add("continuationToken", *args.ContinuationToken)
+ }
+ if args.Top != nil {
+ queryParams.Add("top", strconv.Itoa(*args.Top))
+ }
+ locationId, _ := uuid.Parse("51bb5d21-4305-4ea6-9dbb-b7488af73334")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue GetEnvironmentDeploymentExecutionRecordsResponseValue
+ responseValue.ContinuationToken = resp.Header.Get(azuredevops.HeaderKeyContinuationToken)
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue.Value)
+ return &responseValue, err
+}
+
+// Arguments for the GetEnvironmentDeploymentExecutionRecords function
+type GetEnvironmentDeploymentExecutionRecordsArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (required)
+ EnvironmentId *int
+ // (optional)
+ ContinuationToken *string
+ // (optional)
+ Top *int
+}
+
+// Return type for the GetEnvironmentDeploymentExecutionRecords function
+type GetEnvironmentDeploymentExecutionRecordsResponseValue struct {
+ Value []EnvironmentDeploymentExecutionRecord
+ ContinuationToken string
+}
+
+// [Preview API] Get all environments.
+func (client *ClientImpl) GetEnvironments(ctx context.Context, args GetEnvironmentsArgs) (*GetEnvironmentsResponseValue, error) {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+
+ queryParams := url.Values{}
+ if args.Name != nil {
+ queryParams.Add("name", *args.Name)
+ }
+ if args.ContinuationToken != nil {
+ queryParams.Add("continuationToken", *args.ContinuationToken)
+ }
+ if args.Top != nil {
+ queryParams.Add("$top", strconv.Itoa(*args.Top))
+ }
+ locationId, _ := uuid.Parse("8572b1fc-2482-47fa-8f74-7e3ed53ee54b")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue GetEnvironmentsResponseValue
+ responseValue.ContinuationToken = resp.Header.Get(azuredevops.HeaderKeyContinuationToken)
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue.Value)
+ return &responseValue, err
+}
+
+// Arguments for the GetEnvironments function
+type GetEnvironmentsArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (optional)
+ Name *string
+ // (optional)
+ ContinuationToken *string
+ // (optional)
+ Top *int
+}
+
+// Return type for the GetEnvironments function
+type GetEnvironmentsResponseValue struct {
+ Value []EnvironmentInstance
ContinuationToken string
}
+// [Preview API]
+func (client *ClientImpl) GetKubernetesResource(ctx context.Context, args GetKubernetesResourceArgs) (*KubernetesResource, error) {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.EnvironmentId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.EnvironmentId"}
+ }
+ routeValues["environmentId"] = strconv.Itoa(*args.EnvironmentId)
+ if args.ResourceId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.ResourceId"}
+ }
+ routeValues["resourceId"] = strconv.Itoa(*args.ResourceId)
+
+ locationId, _ := uuid.Parse("73fba52f-15ab-42b3-a538-ce67a9223a04")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue KubernetesResource
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetKubernetesResource function
+type GetKubernetesResourceArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (required)
+ EnvironmentId *int
+ // (required)
+ ResourceId *int
+}
+
// [Preview API] List task groups.
func (client *ClientImpl) GetTaskGroups(ctx context.Context, args GetTaskGroupsArgs) (*[]TaskGroup, error) {
routeValues := make(map[string]string)
@@ -1317,7 +1688,7 @@ func (client *ClientImpl) GetTaskGroups(ctx context.Context, args GetTaskGroupsA
queryParams.Add("queryOrder", string(*args.QueryOrder))
}
locationId, _ := uuid.Parse("6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1360,7 +1731,7 @@ func (client *ClientImpl) GetVariableGroup(ctx context.Context, args GetVariable
routeValues["groupId"] = strconv.Itoa(*args.GroupId)
locationId, _ := uuid.Parse("f5b09dd5-9d54-45a1-8b5a-1c8287d634cc")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.2", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1403,7 +1774,7 @@ func (client *ClientImpl) GetVariableGroups(ctx context.Context, args GetVariabl
queryParams.Add("queryOrder", string(*args.QueryOrder))
}
locationId, _ := uuid.Parse("f5b09dd5-9d54-45a1-8b5a-1c8287d634cc")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.2", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1448,7 +1819,7 @@ func (client *ClientImpl) GetVariableGroupsById(ctx context.Context, args GetVar
listAsString := strings.Join((stringList)[:], ",")
queryParams.Add("groupIds", listAsString)
locationId, _ := uuid.Parse("f5b09dd5-9d54-45a1-8b5a-1c8287d634cc")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.2", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1466,9 +1837,85 @@ type GetVariableGroupsByIdArgs struct {
GroupIds *[]int
}
+// [Preview API]
+func (client *ClientImpl) GetVirtualMachines(ctx context.Context, args GetVirtualMachinesArgs) (*GetVirtualMachinesResponseValue, error) {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.EnvironmentId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.EnvironmentId"}
+ }
+ routeValues["environmentId"] = strconv.Itoa(*args.EnvironmentId)
+ if args.ResourceId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.ResourceId"}
+ }
+ routeValues["resourceId"] = strconv.Itoa(*args.ResourceId)
+
+ queryParams := url.Values{}
+ if args.ContinuationToken != nil {
+ queryParams.Add("continuationToken", *args.ContinuationToken)
+ }
+ if args.Name != nil {
+ queryParams.Add("name", *args.Name)
+ }
+ if args.PartialNameMatch != nil {
+ queryParams.Add("partialNameMatch", strconv.FormatBool(*args.PartialNameMatch))
+ }
+ if args.Tags != nil {
+ listAsString := strings.Join((*args.Tags)[:], ",")
+ queryParams.Add("tags", listAsString)
+ }
+ if args.Top != nil {
+ queryParams.Add("$top", strconv.Itoa(*args.Top))
+ }
+ locationId, _ := uuid.Parse("48700676-2ba5-4282-8ec8-083280d169c7")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue GetVirtualMachinesResponseValue
+ responseValue.ContinuationToken = resp.Header.Get(azuredevops.HeaderKeyContinuationToken)
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue.Value)
+ return &responseValue, err
+}
+
+// Arguments for the GetVirtualMachines function
+type GetVirtualMachinesArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (required)
+ EnvironmentId *int
+ // (required)
+ ResourceId *int
+ // (optional)
+ ContinuationToken *string
+ // (optional)
+ Name *string
+ // (optional)
+ PartialNameMatch *bool
+ // (optional)
+ Tags *[]string
+ // (optional)
+ Top *int
+}
+
+// Return type for the GetVirtualMachines function
+type GetVirtualMachinesResponseValue struct {
+ Value []VirtualMachine
+ ContinuationToken string
+}
+
+// GET the Yaml schema used for Yaml file validation.
func (client *ClientImpl) GetYamlSchema(ctx context.Context, args GetYamlSchemaArgs) (interface{}, error) {
+ queryParams := url.Values{}
+ if args.ValidateTaskNames != nil {
+ queryParams.Add("validateTaskNames", strconv.FormatBool(*args.ValidateTaskNames))
+ }
locationId, _ := uuid.Parse("1f9990b9-1dba-441f-9c2e-6485888c42b6")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", nil, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", nil, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1480,6 +1927,8 @@ func (client *ClientImpl) GetYamlSchema(ctx context.Context, args GetYamlSchemaA
// Arguments for the GetYamlSchema function
type GetYamlSchemaArgs struct {
+ // (optional) Whether the schema should validate that tasks are actually installed (useful for offline tools where you don't want validation).
+ ValidateTaskNames *bool
}
// Replace an agent. You probably don't want to call this endpoint directly. Instead, [use the agent configuration script](https://docs.microsoft.com/azure/devops/pipelines/agents/agents) to remove and reconfigure an agent from your organization.
@@ -1502,7 +1951,7 @@ func (client *ClientImpl) ReplaceAgent(ctx context.Context, args ReplaceAgentArg
return nil, marshalErr
}
locationId, _ := uuid.Parse("e298ef32-5878-4cab-993c-043836571f42")
- resp, err := client.Client.Send(ctx, http.MethodPut, locationId, "5.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPut, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1522,6 +1971,37 @@ type ReplaceAgentArgs struct {
AgentId *int
}
+// [Preview API] Add a variable group.
+func (client *ClientImpl) ShareVariableGroup(ctx context.Context, args ShareVariableGroupArgs) error {
+ if args.VariableGroupProjectReferences == nil {
+ return &azuredevops.ArgumentNilError{ArgumentName: "args.VariableGroupProjectReferences"}
+ }
+ queryParams := url.Values{}
+ if args.VariableGroupId == nil {
+ return &azuredevops.ArgumentNilError{ArgumentName: "variableGroupId"}
+ }
+ queryParams.Add("variableGroupId", strconv.Itoa(*args.VariableGroupId))
+ body, marshalErr := json.Marshal(*args.VariableGroupProjectReferences)
+ if marshalErr != nil {
+ return marshalErr
+ }
+ locationId, _ := uuid.Parse("ef5b7057-ffc3-4c77-bbad-c10b4a4abcc7")
+ _, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0-preview.2", nil, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// Arguments for the ShareVariableGroup function
+type ShareVariableGroupArgs struct {
+ // (required)
+ VariableGroupProjectReferences *[]VariableGroupProjectReference
+ // (required)
+ VariableGroupId *int
+}
+
// Update agent details.
func (client *ClientImpl) UpdateAgent(ctx context.Context, args UpdateAgentArgs) (*TaskAgent, error) {
if args.Agent == nil {
@@ -1542,7 +2022,7 @@ func (client *ClientImpl) UpdateAgent(ctx context.Context, args UpdateAgentArgs)
return nil, marshalErr
}
locationId, _ := uuid.Parse("e298ef32-5878-4cab-993c-043836571f42")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1562,6 +2042,40 @@ type UpdateAgentArgs struct {
AgentId *int
}
+// [Preview API]
+func (client *ClientImpl) UpdateAgentCloud(ctx context.Context, args UpdateAgentCloudArgs) (*TaskAgentCloud, error) {
+ if args.UpdatedCloud == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.UpdatedCloud"}
+ }
+ routeValues := make(map[string]string)
+ if args.AgentCloudId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.AgentCloudId"}
+ }
+ routeValues["agentCloudId"] = strconv.Itoa(*args.AgentCloudId)
+
+ body, marshalErr := json.Marshal(*args.UpdatedCloud)
+ if marshalErr != nil {
+ return nil, marshalErr
+ }
+ locationId, _ := uuid.Parse("bfa72b3d-0fc6-43fb-932b-a7f6559f93b9")
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue TaskAgentCloud
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the UpdateAgentCloud function
+type UpdateAgentCloudArgs struct {
+ // (required)
+ UpdatedCloud *TaskAgentCloud
+ // (required)
+ AgentCloudId *int
+}
+
// Update properties on an agent pool
func (client *ClientImpl) UpdateAgentPool(ctx context.Context, args UpdateAgentPoolArgs) (*TaskAgentPool, error) {
if args.Pool == nil {
@@ -1578,7 +2092,7 @@ func (client *ClientImpl) UpdateAgentPool(ctx context.Context, args UpdateAgentP
return nil, marshalErr
}
locationId, _ := uuid.Parse("a8c47e17-4d56-4a56-92bb-de7ea7dc65be")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1616,7 +2130,7 @@ func (client *ClientImpl) UpdateDeploymentGroup(ctx context.Context, args Update
return nil, marshalErr
}
locationId, _ := uuid.Parse("083c4d89-ab35-45af-aa11-7cf66895c53e")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1656,7 +2170,7 @@ func (client *ClientImpl) UpdateDeploymentTargets(ctx context.Context, args Upda
return nil, marshalErr
}
locationId, _ := uuid.Parse("2f0aa599-c121-4256-a5fd-ba370e0ae7b6")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1676,6 +2190,46 @@ type UpdateDeploymentTargetsArgs struct {
DeploymentGroupId *int
}
+// [Preview API] Update the specified environment.
+func (client *ClientImpl) UpdateEnvironment(ctx context.Context, args UpdateEnvironmentArgs) (*EnvironmentInstance, error) {
+ if args.EnvironmentUpdateParameter == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.EnvironmentUpdateParameter"}
+ }
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.EnvironmentId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.EnvironmentId"}
+ }
+ routeValues["environmentId"] = strconv.Itoa(*args.EnvironmentId)
+
+ body, marshalErr := json.Marshal(*args.EnvironmentUpdateParameter)
+ if marshalErr != nil {
+ return nil, marshalErr
+ }
+ locationId, _ := uuid.Parse("8572b1fc-2482-47fa-8f74-7e3ed53ee54b")
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue EnvironmentInstance
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the UpdateEnvironment function
+type UpdateEnvironmentArgs struct {
+ // (required) Environment data to update.
+ EnvironmentUpdateParameter *EnvironmentUpdateParameter
+ // (required) Project ID or project name
+ Project *string
+ // (required) ID of the environment.
+ EnvironmentId *int
+}
+
// [Preview API] Update a task group.
func (client *ClientImpl) UpdateTaskGroup(ctx context.Context, args UpdateTaskGroupArgs) (*TaskGroup, error) {
if args.TaskGroup == nil {
@@ -1696,7 +2250,7 @@ func (client *ClientImpl) UpdateTaskGroup(ctx context.Context, args UpdateTaskGr
return nil, marshalErr
}
locationId, _ := uuid.Parse("6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7")
- resp, err := client.Client.Send(ctx, http.MethodPut, locationId, "5.1-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPut, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1718,25 +2272,21 @@ type UpdateTaskGroupArgs struct {
// [Preview API] Update a variable group.
func (client *ClientImpl) UpdateVariableGroup(ctx context.Context, args UpdateVariableGroupArgs) (*VariableGroup, error) {
- if args.Group == nil {
- return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.Group"}
+ if args.VariableGroupParameters == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.VariableGroupParameters"}
}
routeValues := make(map[string]string)
- if args.Project == nil || *args.Project == "" {
- return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
- }
- routeValues["project"] = *args.Project
if args.GroupId == nil {
return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.GroupId"}
}
routeValues["groupId"] = strconv.Itoa(*args.GroupId)
- body, marshalErr := json.Marshal(*args.Group)
+ body, marshalErr := json.Marshal(*args.VariableGroupParameters)
if marshalErr != nil {
return nil, marshalErr
}
- locationId, _ := uuid.Parse("f5b09dd5-9d54-45a1-8b5a-1c8287d634cc")
- resp, err := client.Client.Send(ctx, http.MethodPut, locationId, "5.1-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ locationId, _ := uuid.Parse("ef5b7057-ffc3-4c77-bbad-c10b4a4abcc7")
+ resp, err := client.Client.Send(ctx, http.MethodPut, locationId, "6.0-preview.2", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1748,10 +2298,54 @@ func (client *ClientImpl) UpdateVariableGroup(ctx context.Context, args UpdateVa
// Arguments for the UpdateVariableGroup function
type UpdateVariableGroupArgs struct {
- // (required) Variable group to update.
- Group *VariableGroupParameters
- // (required) Project ID or project name
- Project *string
+ // (required)
+ VariableGroupParameters *VariableGroupParameters
// (required) Id of the variable group to update.
GroupId *int
}
+
+// [Preview API]
+func (client *ClientImpl) UpdateVirtualMachines(ctx context.Context, args UpdateVirtualMachinesArgs) (*[]VirtualMachine, error) {
+ if args.Machines == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.Machines"}
+ }
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.EnvironmentId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.EnvironmentId"}
+ }
+ routeValues["environmentId"] = strconv.Itoa(*args.EnvironmentId)
+ if args.ResourceId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.ResourceId"}
+ }
+ routeValues["resourceId"] = strconv.Itoa(*args.ResourceId)
+
+ body, marshalErr := json.Marshal(*args.Machines)
+ if marshalErr != nil {
+ return nil, marshalErr
+ }
+ locationId, _ := uuid.Parse("48700676-2ba5-4282-8ec8-083280d169c7")
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []VirtualMachine
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the UpdateVirtualMachines function
+type UpdateVirtualMachinesArgs struct {
+ // (required)
+ Machines *[]VirtualMachine
+ // (required) Project ID or project name
+ Project *string
+ // (required)
+ EnvironmentId *int
+ // (required)
+ ResourceId *int
+}
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/taskagent/models.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/taskagent/models.go
similarity index 87%
rename from vendor/github.com/microsoft/azure-devops-go-api/azuredevops/taskagent/models.go
rename to vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/taskagent/models.go
index edfa370ae..67a4c5cf3 100644
--- a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/taskagent/models.go
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/taskagent/models.go
@@ -10,10 +10,10 @@ package taskagent
import (
"github.com/google/uuid"
- "github.com/microsoft/azure-devops-go-api/azuredevops"
- "github.com/microsoft/azure-devops-go-api/azuredevops/distributedtaskcommon"
- "github.com/microsoft/azure-devops-go-api/azuredevops/forminput"
- "github.com/microsoft/azure-devops-go-api/azuredevops/webapi"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/distributedtaskcommon"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/forminput"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/webapi"
)
type AadLoginPromptOption string
@@ -75,10 +75,6 @@ type AgentJobRequestMessage struct {
Tasks *[]TaskInstance `json:"tasks,omitempty"`
}
-type AgentMigrationMessage struct {
- AccessToken *string `json:"accessToken,omitempty"`
-}
-
type AgentPoolEvent struct {
EventType *string `json:"eventType,omitempty"`
Pool *TaskAgentPool `json:"pool,omitempty"`
@@ -142,6 +138,7 @@ type AzureKeyVaultVariableGroupProviderData struct {
}
type AzureKeyVaultVariableValue struct {
+ IsReadOnly *bool `json:"isReadOnly,omitempty"`
IsSecret *bool `json:"isSecret,omitempty"`
Value *string `json:"value,omitempty"`
ContentType *string `json:"contentType,omitempty"`
@@ -277,8 +274,27 @@ type DemandExists struct {
}
type DemandMinimumVersion struct {
- Name *string `json:"name,omitempty"`
- Value *string `json:"value,omitempty"`
+ Name *string `json:"name,omitempty"`
+ Value *string `json:"value,omitempty"`
+ Source *DemandSource `json:"source,omitempty"`
+}
+
+type DemandSource struct {
+ SourceName *string `json:"sourceName,omitempty"`
+ SourceType *DemandSourceType `json:"sourceType,omitempty"`
+ SourceVersion *string `json:"sourceVersion,omitempty"`
+}
+
+type DemandSourceType string
+
+type demandSourceTypeValuesType struct {
+ Task DemandSourceType
+ Feature DemandSourceType
+}
+
+var DemandSourceTypeValues = demandSourceTypeValuesType{
+ Task: "task",
+ Feature: "feature",
}
type DependencyBinding struct {
@@ -532,6 +548,61 @@ type DiagnosticLogMetadata struct {
PoolId *int `json:"poolId,omitempty"`
}
+type ElasticAgentPoolResizedEvent struct {
+ NewSize *int `json:"newSize,omitempty"`
+ PoolId *int `json:"poolId,omitempty"`
+ PoolName *string `json:"poolName,omitempty"`
+ PreviousSize *int `json:"previousSize,omitempty"`
+ ResourceId *string `json:"resourceId,omitempty"`
+}
+
+// Data and settings for an elastic pool
+type ElasticPool struct {
+ // Azure string representing to location of the resource
+ AzureId *string `json:"azureId,omitempty"`
+ // Number of machines to have ready waiting for jobs
+ DesiredIdle *int `json:"desiredIdle,omitempty"`
+ // The desired size of the pool
+ DesiredSize *int `json:"desiredSize,omitempty"`
+ // Maximum number of machines that will exist in the elastic pool
+ MaxCapacity *int `json:"maxCapacity,omitempty"`
+ // Timestamp the pool was first detected to be offline
+ OfflineSince *azuredevops.Time `json:"offlineSince,omitempty"`
+ // Operating system type of the machines in the pool
+ OsType *OperatingSystemType `json:"osType,omitempty"`
+ // Id of the associated TaskAgentPool
+ PoolId *int `json:"poolId,omitempty"`
+ // Keep machines in the pool on failure for investigation
+ PreserveFailures *bool `json:"preserveFailures,omitempty"`
+ // Discard machines after each job completes
+ RecycleAfterEachUse *bool `json:"recycleAfterEachUse,omitempty"`
+ // Id of the Service Endpoint used to connect to Azure
+ ServiceEndpointId *uuid.UUID `json:"serviceEndpointId,omitempty"`
+ // Scope the Service Endpoint belongs to
+ ServiceEndpointScope *uuid.UUID `json:"serviceEndpointScope,omitempty"`
+ // The number of sizing attempts executed while trying to achieve a desired size
+ SizingAttempts *int `json:"sizingAttempts,omitempty"`
+ // State of the pool
+ State *ElasticPoolState `json:"state,omitempty"`
+}
+
+type ElasticPoolState string
+
+type elasticPoolStateValuesType struct {
+ Online ElasticPoolState
+ Offline ElasticPoolState
+ Unhealthy ElasticPoolState
+ New ElasticPoolState
+}
+
+var ElasticPoolStateValues = elasticPoolStateValuesType{
+ // Online and healthy
+ Online: "online",
+ Offline: "offline",
+ Unhealthy: "unhealthy",
+ New: "new",
+}
+
type EndpointAuthorization struct {
// Gets or sets the parameters for the selected authorization scheme.
Parameters *map[string]string `json:"parameters,omitempty"`
@@ -649,7 +720,9 @@ type EnvironmentInstance struct {
// Last modified time of the Environment
LastModifiedOn *azuredevops.Time `json:"lastModifiedOn,omitempty"`
// Name of the Environment.
- Name *string `json:"name,omitempty"`
+ Name *string `json:"name,omitempty"`
+ // Project information for environment.
+ Project *ProjectReference `json:"project,omitempty"`
Resources *[]EnvironmentResourceReference `json:"resources,omitempty"`
}
@@ -674,16 +747,36 @@ type EnvironmentResource struct {
LastModifiedBy *webapi.IdentityRef `json:"lastModifiedBy,omitempty"`
LastModifiedOn *azuredevops.Time `json:"lastModifiedOn,omitempty"`
Name *string `json:"name,omitempty"`
+ // Tags of the Environment Resource.
+ Tags *[]string `json:"tags,omitempty"`
// Environment resource type
Type *EnvironmentResourceType `json:"type,omitempty"`
}
+// EnvironmentResourceDeploymentExecutionRecord.
+type EnvironmentResourceDeploymentExecutionRecord struct {
+ // Id of the Environment
+ EnvironmentId *int `json:"environmentId,omitempty"`
+ // Finish time of the environment resource deployment execution
+ FinishTime *azuredevops.Time `json:"finishTime,omitempty"`
+ // Id of the Environment deployment execution history record
+ RequestId *uint64 `json:"requestId,omitempty"`
+ // Resource Id
+ ResourceId *int `json:"resourceId,omitempty"`
+ // Result of the environment deployment execution
+ Result *TaskResult `json:"result,omitempty"`
+ // Start time of the environment resource deployment execution
+ StartTime *azuredevops.Time `json:"startTime,omitempty"`
+}
+
// EnvironmentResourceReference.
type EnvironmentResourceReference struct {
// Id of the resource.
Id *int `json:"id,omitempty"`
// Name of the resource.
Name *string `json:"name,omitempty"`
+ // Tags of the Environment Resource Reference.
+ Tags *[]string `json:"tags,omitempty"`
// Type of the resource.
Type *EnvironmentResourceType `json:"type,omitempty"`
}
@@ -788,10 +881,11 @@ type JobCancelMessage struct {
}
type JobCompletedEvent struct {
- JobId *uuid.UUID `json:"jobId,omitempty"`
- Name *string `json:"name,omitempty"`
- RequestId *uint64 `json:"requestId,omitempty"`
- Result *TaskResult `json:"result,omitempty"`
+ JobId *uuid.UUID `json:"jobId,omitempty"`
+ Name *string `json:"name,omitempty"`
+ AgentShuttingDown *bool `json:"agentShuttingDown,omitempty"`
+ RequestId *uint64 `json:"requestId,omitempty"`
+ Result *TaskResult `json:"result,omitempty"`
}
// Represents the context of variables and vectors for a job request.
@@ -850,6 +944,8 @@ type KubernetesResource struct {
LastModifiedBy *webapi.IdentityRef `json:"lastModifiedBy,omitempty"`
LastModifiedOn *azuredevops.Time `json:"lastModifiedOn,omitempty"`
Name *string `json:"name,omitempty"`
+ // Tags of the Environment Resource.
+ Tags *[]string `json:"tags,omitempty"`
// Environment resource type
Type *EnvironmentResourceType `json:"type,omitempty"`
ClusterName *string `json:"clusterName,omitempty"`
@@ -858,12 +954,38 @@ type KubernetesResource struct {
}
type KubernetesResourceCreateParameters struct {
- ClusterName *string `json:"clusterName,omitempty"`
- Name *string `json:"name,omitempty"`
- Namespace *string `json:"namespace,omitempty"`
+ ClusterName *string `json:"clusterName,omitempty"`
+ Name *string `json:"name,omitempty"`
+ Namespace *string `json:"namespace,omitempty"`
+ // Tags of the kubernetes resource.
+ Tags *[]string `json:"tags,omitempty"`
+}
+
+type KubernetesResourceCreateParametersExistingEndpoint struct {
+ ClusterName *string `json:"clusterName,omitempty"`
+ Name *string `json:"name,omitempty"`
+ Namespace *string `json:"namespace,omitempty"`
+ // Tags of the kubernetes resource.
+ Tags *[]string `json:"tags,omitempty"`
ServiceEndpointId *uuid.UUID `json:"serviceEndpointId,omitempty"`
}
+type KubernetesResourceCreateParametersNewEndpoint struct {
+ ClusterName *string `json:"clusterName,omitempty"`
+ Name *string `json:"name,omitempty"`
+ Namespace *string `json:"namespace,omitempty"`
+ // Tags of the kubernetes resource.
+ Tags *[]string `json:"tags,omitempty"`
+ Endpoint *ServiceEndpoint `json:"endpoint,omitempty"`
+}
+
+type KubernetesResourcePatchParameters struct {
+ AuthorizationParameters *map[string]string `json:"authorizationParameters,omitempty"`
+ // Provider type (CustomProvider or AzureKubernetesServiceProvider) of the resource to be updated
+ ProviderType *string `json:"providerType,omitempty"`
+ ResourceId *int `json:"resourceId,omitempty"`
+}
+
// [Flags]
type MachineGroupActionFilter string
@@ -930,6 +1052,18 @@ type MetricsRow struct {
Metrics *[]string `json:"metrics,omitempty"`
}
+type OperatingSystemType string
+
+type operatingSystemTypeValuesType struct {
+ Windows OperatingSystemType
+ Linux OperatingSystemType
+}
+
+var OperatingSystemTypeValues = operatingSystemTypeValuesType{
+ Windows: "windows",
+ Linux: "linux",
+}
+
// Represents a downloadable package.
type PackageMetadata struct {
// The date the package was created
@@ -1047,11 +1181,62 @@ type ResourceLimit struct {
TotalMinutes *int `json:"totalMinutes,omitempty"`
}
+// A request for a resource's exclusive lock
+type ResourceLockRequest struct {
+ // The date/time this request was assigned.
+ AssignTime *azuredevops.Time `json:"assignTime,omitempty"`
+ // The ID of the check run waiting on this request
+ CheckRunId *uuid.UUID `json:"checkRunId,omitempty"`
+ // The ID of the pipeline that requested this resource
+ DefinitionId *int `json:"definitionId,omitempty"`
+ // The date/time this request was finished.
+ FinishTime *azuredevops.Time `json:"finishTime,omitempty"`
+ // Attempt of the graph node
+ NodeAttempt *int `json:"nodeAttempt,omitempty"`
+ // Name of the graph node (currently stage) requesting this resource
+ NodeName *string `json:"nodeName,omitempty"`
+ // Internal ID for the orchestration plan connected with this request.
+ PlanId *uuid.UUID `json:"planId,omitempty"`
+ // The ID of the project of the check run and definition exist in
+ ProjectId *uuid.UUID `json:"projectId,omitempty"`
+ // The date/time this request was queued.
+ QueueTime *azuredevops.Time `json:"queueTime,omitempty"`
+ // ID of the request.
+ RequestId *uint64 `json:"requestId,omitempty"`
+ // The id of the resource
+ ResourceId *string `json:"resourceId,omitempty"`
+ // The type of the resource
+ ResourceType *string `json:"resourceType,omitempty"`
+ // The result of this request.
+ Status *ResourceLockStatus `json:"status,omitempty"`
+}
+
+type ResourceLockStatus string
+
+type resourceLockStatusValuesType struct {
+ Queued ResourceLockStatus
+ InUse ResourceLockStatus
+ Finished ResourceLockStatus
+ TimedOut ResourceLockStatus
+ Canceled ResourceLockStatus
+ Abandoned ResourceLockStatus
+}
+
+var ResourceLockStatusValues = resourceLockStatusValuesType{
+ Queued: "queued",
+ InUse: "inUse",
+ Finished: "finished",
+ TimedOut: "timedOut",
+ Canceled: "canceled",
+ Abandoned: "abandoned",
+}
+
type ResourcesHubData struct {
- ContinuationToken *string `json:"continuationToken,omitempty"`
- ResourceFilterOptions *ResourceFilterOptions `json:"resourceFilterOptions,omitempty"`
- ResourceFilters *ResourceFilters `json:"resourceFilters,omitempty"`
- ResourceItems *[]ResourceItem `json:"resourceItems,omitempty"`
+ ContinuationToken *string `json:"continuationToken,omitempty"`
+ HasProjectLevelManagePermission *bool `json:"hasProjectLevelManagePermission,omitempty"`
+ ResourceFilterOptions *ResourceFilterOptions `json:"resourceFilterOptions,omitempty"`
+ ResourceFilters *ResourceFilters `json:"resourceFilters,omitempty"`
+ ResourceItems *[]ResourceItem `json:"resourceItems,omitempty"`
}
type ResourceUsage struct {
@@ -1338,6 +1523,10 @@ type TaskAgentDelaySource struct {
TaskAgent *TaskAgentReference `json:"taskAgent,omitempty"`
}
+type TaskAgentDowngrade struct {
+ Code *TaskAgentUpdateReasonType `json:"code,omitempty"`
+}
+
type TaskAgentJob struct {
Container *string `json:"container,omitempty"`
Id *uuid.UUID `json:"id,omitempty"`
@@ -1491,6 +1680,8 @@ type TaskAgentPool struct {
// Determines whether the pool is legacy.
IsLegacy *bool `json:"isLegacy,omitempty"`
Name *string `json:"name,omitempty"`
+ // Additional pool settings and details
+ Options *TaskAgentPoolOptions `json:"options,omitempty"`
// Gets or sets the type of the pool
PoolType *TaskAgentPoolType `json:"poolType,omitempty"`
Scope *uuid.UUID `json:"scope,omitempty"`
@@ -1502,6 +1693,8 @@ type TaskAgentPool struct {
AutoProvision *bool `json:"autoProvision,omitempty"`
// Whether or not the pool should autosize itself based on the Agent Cloud Provider settings.
AutoSize *bool `json:"autoSize,omitempty"`
+ // Whether or not agents in this pool are allowed to automatically update
+ AutoUpdate *bool `json:"autoUpdate,omitempty"`
// Creator of the pool. The creator of the pool is automatically added into the administrators group for the pool on creation.
CreatedBy *webapi.IdentityRef `json:"createdBy,omitempty"`
// The date/time of the pool creation.
@@ -1669,6 +1862,26 @@ var TaskAgentPoolMaintenanceScheduleDaysValues = taskAgentPoolMaintenanceSchedul
All: "all",
}
+// [Flags] Additional settings and descriptors for a TaskAgentPool
+type TaskAgentPoolOptions string
+
+type taskAgentPoolOptionsValuesType struct {
+ None TaskAgentPoolOptions
+ ElasticPool TaskAgentPoolOptions
+ SingleUseAgents TaskAgentPoolOptions
+ PreserveAgentOnJobFailure TaskAgentPoolOptions
+}
+
+var TaskAgentPoolOptionsValues = taskAgentPoolOptionsValuesType{
+ None: "none",
+ // TaskAgentPool backed by the Elastic pool service
+ ElasticPool: "elasticPool",
+ // Set to true if agents are re-imaged after each TaskAgentJobRequest
+ SingleUseAgents: "singleUseAgents",
+ // Set to true if agents are held for investigation after a TaskAgentJobRequest failure
+ PreserveAgentOnJobFailure: "preserveAgentOnJobFailure",
+}
+
type TaskAgentPoolReference struct {
Id *int `json:"id,omitempty"`
// Gets or sets a value indicating whether or not this pool is managed by the service.
@@ -1676,6 +1889,8 @@ type TaskAgentPoolReference struct {
// Determines whether the pool is legacy.
IsLegacy *bool `json:"isLegacy,omitempty"`
Name *string `json:"name,omitempty"`
+ // Additional pool settings and details
+ Options *TaskAgentPoolOptions `json:"options,omitempty"`
// Gets or sets the type of the pool
PoolType *TaskAgentPoolType `json:"poolType,omitempty"`
Scope *uuid.UUID `json:"scope,omitempty"`
@@ -1690,6 +1905,8 @@ type TaskAgentPoolStatus struct {
// Determines whether the pool is legacy.
IsLegacy *bool `json:"isLegacy,omitempty"`
Name *string `json:"name,omitempty"`
+ // Additional pool settings and details
+ Options *TaskAgentPoolOptions `json:"options,omitempty"`
// Gets or sets the type of the pool
PoolType *TaskAgentPoolType `json:"poolType,omitempty"`
Scope *uuid.UUID `json:"scope,omitempty"`
@@ -1858,11 +2075,13 @@ type TaskAgentUpdateReasonType string
type taskAgentUpdateReasonTypeValuesType struct {
Manual TaskAgentUpdateReasonType
MinAgentVersionRequired TaskAgentUpdateReasonType
+ Downgrade TaskAgentUpdateReasonType
}
var TaskAgentUpdateReasonTypeValues = taskAgentUpdateReasonTypeValuesType{
Manual: "manual",
MinAgentVersionRequired: "minAgentVersionRequired",
+ Downgrade: "downgrade",
}
type TaskAssignedEvent struct {
@@ -2107,6 +2326,19 @@ var TaskGroupExpandsValues = taskGroupExpandsValuesType{
Tasks: "tasks",
}
+type TaskGroupPublishPreviewParameter struct {
+ // Comment for this update request
+ Comment *string `json:"comment,omitempty"`
+ // This is to disable previous versions of task group upon publish
+ DisablePriorVersions *bool `json:"disablePriorVersions,omitempty"`
+ // Denotes if task group is in preview
+ Preview *bool `json:"preview,omitempty"`
+ // This is the revision of task group that is getting published
+ Revision *int `json:"revision,omitempty"`
+ // This is the version of task group that is getting published
+ Version *TaskVersion `json:"version,omitempty"`
+}
+
// Specifies the desired ordering of taskGroups.
type TaskGroupQueryOrder string
@@ -2122,6 +2354,13 @@ var TaskGroupQueryOrderValues = taskGroupQueryOrderValuesType{
CreatedOnDescending: "createdOnDescending",
}
+type TaskGroupRestoreParameter struct {
+ // Comment for this update request
+ Comment *string `json:"comment,omitempty"`
+ // This is to restore deleted Task Group
+ Restore *bool `json:"restore,omitempty"`
+}
+
type TaskGroupRevision struct {
ChangedBy *webapi.IdentityRef `json:"changedBy,omitempty"`
ChangedDate *azuredevops.Time `json:"changedDate,omitempty"`
@@ -2188,17 +2427,21 @@ type TaskGroupUpdateParameter struct {
Version *TaskVersion `json:"version,omitempty"`
}
+type TaskGroupUpdatePropertiesBase struct {
+ // Comment for this update request
+ Comment *string `json:"comment,omitempty"`
+}
+
type TaskHubLicenseDetails struct {
- EnterpriseUsersCount *int `json:"enterpriseUsersCount,omitempty"`
- FailedToReachAllProviders *bool `json:"failedToReachAllProviders,omitempty"`
- FreeHostedLicenseCount *int `json:"freeHostedLicenseCount,omitempty"`
- FreeLicenseCount *int `json:"freeLicenseCount,omitempty"`
- HasLicenseCountEverUpdated *bool `json:"hasLicenseCountEverUpdated,omitempty"`
- HostedAgentMinutesFreeCount *int `json:"hostedAgentMinutesFreeCount,omitempty"`
- HostedAgentMinutesUsedCount *int `json:"hostedAgentMinutesUsedCount,omitempty"`
- HostedLicensesArePremium *bool `json:"hostedLicensesArePremium,omitempty"`
- MarketplacePurchasedHostedLicenses *[]MarketplacePurchasedLicense `json:"marketplacePurchasedHostedLicenses,omitempty"`
- MsdnUsersCount *int `json:"msdnUsersCount,omitempty"`
+ EnterpriseUsersCount *int `json:"enterpriseUsersCount,omitempty"`
+ FailedToReachAllProviders *bool `json:"failedToReachAllProviders,omitempty"`
+ FreeHostedLicenseCount *int `json:"freeHostedLicenseCount,omitempty"`
+ FreeLicenseCount *int `json:"freeLicenseCount,omitempty"`
+ HasLicenseCountEverUpdated *bool `json:"hasLicenseCountEverUpdated,omitempty"`
+ HostedAgentMinutesFreeCount *int `json:"hostedAgentMinutesFreeCount,omitempty"`
+ HostedAgentMinutesUsedCount *int `json:"hostedAgentMinutesUsedCount,omitempty"`
+ HostedLicensesArePremium *bool `json:"hostedLicensesArePremium,omitempty"`
+ MsdnUsersCount *int `json:"msdnUsersCount,omitempty"`
// Microsoft-hosted licenses purchased from VSTS directly.
PurchasedHostedLicenseCount *int `json:"purchasedHostedLicenseCount,omitempty"`
// Self-hosted licenses purchased from VSTS directly.
@@ -2310,6 +2553,7 @@ type TaskOrchestrationPlan struct {
ScopeIdentifier *uuid.UUID `json:"scopeIdentifier,omitempty"`
Version *int `json:"version,omitempty"`
Environment *PlanEnvironment `json:"environment,omitempty"`
+ ExpandedYaml *TaskLogReference `json:"expandedYaml,omitempty"`
FinishTime *azuredevops.Time `json:"finishTime,omitempty"`
Implementation *TaskOrchestrationContainer `json:"implementation,omitempty"`
InitializationLog *TaskLogReference `json:"initializationLog,omitempty"`
@@ -2465,39 +2709,43 @@ type TimelineAttempt struct {
}
type TimelineRecord struct {
- Attempt *int `json:"attempt,omitempty"`
- ChangeId *int `json:"changeId,omitempty"`
- CurrentOperation *string `json:"currentOperation,omitempty"`
- Details *TimelineReference `json:"details,omitempty"`
- ErrorCount *int `json:"errorCount,omitempty"`
- FinishTime *azuredevops.Time `json:"finishTime,omitempty"`
- Id *uuid.UUID `json:"id,omitempty"`
- Identifier *string `json:"identifier,omitempty"`
- Issues *[]Issue `json:"issues,omitempty"`
- LastModified *azuredevops.Time `json:"lastModified,omitempty"`
- Location *string `json:"location,omitempty"`
- Log *TaskLogReference `json:"log,omitempty"`
- Name *string `json:"name,omitempty"`
- Order *int `json:"order,omitempty"`
- ParentId *uuid.UUID `json:"parentId,omitempty"`
- PercentComplete *int `json:"percentComplete,omitempty"`
- PreviousAttempts *[]TimelineAttempt `json:"previousAttempts,omitempty"`
- RefName *string `json:"refName,omitempty"`
- Result *TaskResult `json:"result,omitempty"`
- ResultCode *string `json:"resultCode,omitempty"`
- StartTime *azuredevops.Time `json:"startTime,omitempty"`
- State *TimelineRecordState `json:"state,omitempty"`
- Task *TaskReference `json:"task,omitempty"`
- Type *string `json:"type,omitempty"`
- Variables *map[string]interface{} `json:"variables,omitempty"`
- WarningCount *int `json:"warningCount,omitempty"`
- WorkerName *string `json:"workerName,omitempty"`
+ AgentSpecification interface{} `json:"agentSpecification,omitempty"`
+ Attempt *int `json:"attempt,omitempty"`
+ ChangeId *int `json:"changeId,omitempty"`
+ CurrentOperation *string `json:"currentOperation,omitempty"`
+ Details *TimelineReference `json:"details,omitempty"`
+ ErrorCount *int `json:"errorCount,omitempty"`
+ FinishTime *azuredevops.Time `json:"finishTime,omitempty"`
+ Id *uuid.UUID `json:"id,omitempty"`
+ Identifier *string `json:"identifier,omitempty"`
+ Issues *[]Issue `json:"issues,omitempty"`
+ LastModified *azuredevops.Time `json:"lastModified,omitempty"`
+ Location *string `json:"location,omitempty"`
+ Log *TaskLogReference `json:"log,omitempty"`
+ Name *string `json:"name,omitempty"`
+ Order *int `json:"order,omitempty"`
+ ParentId *uuid.UUID `json:"parentId,omitempty"`
+ PercentComplete *int `json:"percentComplete,omitempty"`
+ PreviousAttempts *[]TimelineAttempt `json:"previousAttempts,omitempty"`
+ QueueId *int `json:"queueId,omitempty"`
+ RefName *string `json:"refName,omitempty"`
+ Result *TaskResult `json:"result,omitempty"`
+ ResultCode *string `json:"resultCode,omitempty"`
+ StartTime *azuredevops.Time `json:"startTime,omitempty"`
+ State *TimelineRecordState `json:"state,omitempty"`
+ Task *TaskReference `json:"task,omitempty"`
+ Type *string `json:"type,omitempty"`
+ Variables *map[string]interface{} `json:"variables,omitempty"`
+ WarningCount *int `json:"warningCount,omitempty"`
+ WorkerName *string `json:"workerName,omitempty"`
}
type TimelineRecordFeedLinesWrapper struct {
- Count *int `json:"count,omitempty"`
- StepId *uuid.UUID `json:"stepId,omitempty"`
- Value *[]string `json:"value,omitempty"`
+ Count *int `json:"count,omitempty"`
+ EndLine *uint64 `json:"endLine,omitempty"`
+ StartLine *uint64 `json:"startLine,omitempty"`
+ StepId *uuid.UUID `json:"stepId,omitempty"`
+ Value *[]string `json:"value,omitempty"`
}
type TimelineRecordState string
@@ -2553,6 +2801,8 @@ type VariableGroup struct {
ProviderData interface{} `json:"providerData,omitempty"`
// Gets or sets type of the variable group.
Type *string `json:"type,omitempty"`
+ // all project references where the variable group is shared with other projects.
+ VariableGroupProjectReferences *[]VariableGroupProjectReference `json:"variableGroupProjectReferences,omitempty"`
// Gets or sets variables contained in the variable group.
Variables *map[string]interface{} `json:"variables,omitempty"`
}
@@ -2580,11 +2830,22 @@ type VariableGroupParameters struct {
// Sets provider data.
ProviderData interface{} `json:"providerData,omitempty"`
// Sets type of the variable group.
- Type *string `json:"type,omitempty"`
+ Type *string `json:"type,omitempty"`
+ VariableGroupProjectReferences *[]VariableGroupProjectReference `json:"variableGroupProjectReferences,omitempty"`
// Sets variables contained in the variable group.
Variables *map[string]interface{} `json:"variables,omitempty"`
}
+// A variable group reference is a shallow reference to variable group.
+type VariableGroupProjectReference struct {
+ // Gets or sets description of the variable group.
+ Description *string `json:"description,omitempty"`
+ // Gets or sets name of the variable group.
+ Name *string `json:"name,omitempty"`
+ // Gets or sets project reference of the variable group.
+ ProjectReference *ProjectReference `json:"projectReference,omitempty"`
+}
+
// Defines provider data of the variable group.
type VariableGroupProviderData struct {
}
@@ -2605,8 +2866,9 @@ var VariableGroupQueryOrderValues = variableGroupQueryOrderValuesType{
}
type VariableValue struct {
- IsSecret *bool `json:"isSecret,omitempty"`
- Value *string `json:"value,omitempty"`
+ IsReadOnly *bool `json:"isReadOnly,omitempty"`
+ IsSecret *bool `json:"isSecret,omitempty"`
+ Value *string `json:"value,omitempty"`
}
type VirtualMachine struct {
@@ -2623,6 +2885,8 @@ type VirtualMachineGroup struct {
LastModifiedBy *webapi.IdentityRef `json:"lastModifiedBy,omitempty"`
LastModifiedOn *azuredevops.Time `json:"lastModifiedOn,omitempty"`
Name *string `json:"name,omitempty"`
+ // Tags of the Environment Resource.
+ Tags *[]string `json:"tags,omitempty"`
// Environment resource type
Type *EnvironmentResourceType `json:"type,omitempty"`
PoolId *int `json:"poolId,omitempty"`
@@ -2631,3 +2895,22 @@ type VirtualMachineGroup struct {
type VirtualMachineGroupCreateParameters struct {
Name *string `json:"name,omitempty"`
}
+
+type VirtualMachineResource struct {
+ CreatedBy *webapi.IdentityRef `json:"createdBy,omitempty"`
+ CreatedOn *azuredevops.Time `json:"createdOn,omitempty"`
+ EnvironmentReference *EnvironmentReference `json:"environmentReference,omitempty"`
+ Id *int `json:"id,omitempty"`
+ LastModifiedBy *webapi.IdentityRef `json:"lastModifiedBy,omitempty"`
+ LastModifiedOn *azuredevops.Time `json:"lastModifiedOn,omitempty"`
+ Name *string `json:"name,omitempty"`
+ // Tags of the Environment Resource.
+ Tags *[]string `json:"tags,omitempty"`
+ // Environment resource type
+ Type *EnvironmentResourceType `json:"type,omitempty"`
+ Agent *TaskAgent `json:"agent,omitempty"`
+}
+
+type VirtualMachineResourceCreateParameters struct {
+ VirtualMachineResource *VirtualMachineResource `json:"virtualMachineResource,omitempty"`
+}
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/test/client.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/test/client.go
similarity index 96%
rename from vendor/github.com/microsoft/azure-devops-go-api/azuredevops/test/client.go
rename to vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/test/client.go
index 908f6be93..1f8a2e574 100644
--- a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/test/client.go
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/test/client.go
@@ -13,7 +13,7 @@ import (
"context"
"encoding/json"
"github.com/google/uuid"
- "github.com/microsoft/azure-devops-go-api/azuredevops"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6"
"io"
"net/http"
"net/url"
@@ -152,7 +152,7 @@ func (client *ClientImpl) AddTestCasesToSuite(ctx context.Context, args AddTestC
routeValues["action"] = "TestCases"
locationId, _ := uuid.Parse("a4a1ec1c-b03f-41ca-8857-704594ecf58e")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -194,7 +194,7 @@ func (client *ClientImpl) AddTestResultsToTestRun(ctx context.Context, args AddT
return nil, marshalErr
}
locationId, _ := uuid.Parse("4637d869-3a76-4468-8057-0bb02aa385cf")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -238,7 +238,7 @@ func (client *ClientImpl) CreateTestResultAttachment(ctx context.Context, args C
return nil, marshalErr
}
locationId, _ := uuid.Parse("2bffebe9-2f0f-4639-9af8-56129e9fed2d")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -276,7 +276,7 @@ func (client *ClientImpl) CreateTestRun(ctx context.Context, args CreateTestRunA
return nil, marshalErr
}
locationId, _ := uuid.Parse("cadb3810-d47d-4a3c-a234-fe5f3be50138")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -314,7 +314,7 @@ func (client *ClientImpl) CreateTestRunAttachment(ctx context.Context, args Crea
return nil, marshalErr
}
locationId, _ := uuid.Parse("4f004af4-a507-489c-9b13-cb62060beb11")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -353,7 +353,7 @@ func (client *ClientImpl) CreateTestSession(ctx context.Context, args CreateTest
return nil, marshalErr
}
locationId, _ := uuid.Parse("1500b4b4-6c69-4ca6-9b18-35e9e97fe2ac")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -402,7 +402,7 @@ func (client *ClientImpl) CreateTestSubResultAttachment(ctx context.Context, arg
return nil, marshalErr
}
locationId, _ := uuid.Parse("2bffebe9-2f0f-4639-9af8-56129e9fed2d")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.1", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.1", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -439,7 +439,7 @@ func (client *ClientImpl) DeleteTestCase(ctx context.Context, args DeleteTestCas
routeValues["testCaseId"] = strconv.Itoa(*args.TestCaseId)
locationId, _ := uuid.Parse("4d472e0f-e32c-4ef8-adf4-a4078772889c")
- _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return err
}
@@ -468,7 +468,7 @@ func (client *ClientImpl) DeleteTestRun(ctx context.Context, args DeleteTestRunA
routeValues["runId"] = strconv.Itoa(*args.RunId)
locationId, _ := uuid.Parse("cadb3810-d47d-4a3c-a234-fe5f3be50138")
- _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return err
}
@@ -508,7 +508,7 @@ func (client *ClientImpl) GetActionResults(ctx context.Context, args GetActionRe
}
locationId, _ := uuid.Parse("eaf40c31-ff84-4062-aafd-d5664be11a37")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -550,7 +550,7 @@ func (client *ClientImpl) GetBuildCodeCoverage(ctx context.Context, args GetBuil
}
queryParams.Add("flags", strconv.Itoa(*args.Flags))
locationId, _ := uuid.Parse("77560e8a-4e8c-4d59-894e-a5f264c24444")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -595,7 +595,7 @@ func (client *ClientImpl) GetPoint(ctx context.Context, args GetPointArgs) (*Tes
queryParams.Add("witFields", *args.WitFields)
}
locationId, _ := uuid.Parse("3bcfd5c8-be62-488e-b1da-b8289ce9299c")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -658,7 +658,7 @@ func (client *ClientImpl) GetPoints(ctx context.Context, args GetPointsArgs) (*[
queryParams.Add("$top", strconv.Itoa(*args.Top))
}
locationId, _ := uuid.Parse("3bcfd5c8-be62-488e-b1da-b8289ce9299c")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -715,7 +715,7 @@ func (client *ClientImpl) GetPointsByQuery(ctx context.Context, args GetPointsBy
return nil, marshalErr
}
locationId, _ := uuid.Parse("b4264fd0-a5d1-43e2-82a5-b9c46b7da9ce")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.2", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.2", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -762,7 +762,7 @@ func (client *ClientImpl) GetResultParameters(ctx context.Context, args GetResul
queryParams.Add("paramName", *args.ParamName)
}
locationId, _ := uuid.Parse("7c69810d-3354-4af3-844a-180bd25db08a")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -795,7 +795,7 @@ func (client *ClientImpl) GetResultRetentionSettings(ctx context.Context, args G
routeValues["project"] = *args.Project
locationId, _ := uuid.Parse("a3206d9e-fa8d-42d3-88cb-f75c51e69cde")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -833,7 +833,7 @@ func (client *ClientImpl) GetTestCaseById(ctx context.Context, args GetTestCaseB
routeValues["action"] = "TestCases"
locationId, _ := uuid.Parse("a4a1ec1c-b03f-41ca-8857-704594ecf58e")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -873,7 +873,7 @@ func (client *ClientImpl) GetTestCases(ctx context.Context, args GetTestCasesArg
routeValues["action"] = "TestCases"
locationId, _ := uuid.Parse("a4a1ec1c-b03f-41ca-8857-704594ecf58e")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -918,7 +918,7 @@ func (client *ClientImpl) GetTestIteration(ctx context.Context, args GetTestIter
queryParams.Add("includeActionResults", strconv.FormatBool(*args.IncludeActionResults))
}
locationId, _ := uuid.Parse("73eb9074-3446-4c44-8296-2f811950ff8d")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -963,7 +963,7 @@ func (client *ClientImpl) GetTestIterations(ctx context.Context, args GetTestIte
queryParams.Add("includeActionResults", strconv.FormatBool(*args.IncludeActionResults))
}
locationId, _ := uuid.Parse("73eb9074-3446-4c44-8296-2f811950ff8d")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1006,7 +1006,7 @@ func (client *ClientImpl) GetTestResultAttachmentContent(ctx context.Context, ar
routeValues["attachmentId"] = strconv.Itoa(*args.AttachmentId)
locationId, _ := uuid.Parse("2bffebe9-2f0f-4639-9af8-56129e9fed2d")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/octet-stream", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/octet-stream", nil)
if err != nil {
return nil, err
}
@@ -1043,7 +1043,7 @@ func (client *ClientImpl) GetTestResultAttachments(ctx context.Context, args Get
routeValues["testCaseResultId"] = strconv.Itoa(*args.TestCaseResultId)
locationId, _ := uuid.Parse("2bffebe9-2f0f-4639-9af8-56129e9fed2d")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1084,7 +1084,7 @@ func (client *ClientImpl) GetTestResultAttachmentZip(ctx context.Context, args G
routeValues["attachmentId"] = strconv.Itoa(*args.AttachmentId)
locationId, _ := uuid.Parse("2bffebe9-2f0f-4639-9af8-56129e9fed2d")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/zip", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/zip", nil)
if err != nil {
return nil, err
}
@@ -1125,7 +1125,7 @@ func (client *ClientImpl) GetTestResultById(ctx context.Context, args GetTestRes
queryParams.Add("detailsToInclude", string(*args.DetailsToInclude))
}
locationId, _ := uuid.Parse("4637d869-3a76-4468-8057-0bb02aa385cf")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1178,7 +1178,7 @@ func (client *ClientImpl) GetTestResults(ctx context.Context, args GetTestResult
queryParams.Add("outcomes", listAsString)
}
locationId, _ := uuid.Parse("4637d869-3a76-4468-8057-0bb02aa385cf")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1221,7 +1221,7 @@ func (client *ClientImpl) GetTestRunAttachmentContent(ctx context.Context, args
routeValues["attachmentId"] = strconv.Itoa(*args.AttachmentId)
locationId, _ := uuid.Parse("4f004af4-a507-489c-9b13-cb62060beb11")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/octet-stream", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/octet-stream", nil)
if err != nil {
return nil, err
}
@@ -1252,7 +1252,7 @@ func (client *ClientImpl) GetTestRunAttachments(ctx context.Context, args GetTes
routeValues["runId"] = strconv.Itoa(*args.RunId)
locationId, _ := uuid.Parse("4f004af4-a507-489c-9b13-cb62060beb11")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1287,7 +1287,7 @@ func (client *ClientImpl) GetTestRunAttachmentZip(ctx context.Context, args GetT
routeValues["attachmentId"] = strconv.Itoa(*args.AttachmentId)
locationId, _ := uuid.Parse("4f004af4-a507-489c-9b13-cb62060beb11")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/zip", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/zip", nil)
if err != nil {
return nil, err
}
@@ -1322,7 +1322,7 @@ func (client *ClientImpl) GetTestRunById(ctx context.Context, args GetTestRunByI
queryParams.Add("includeDetails", strconv.FormatBool(*args.IncludeDetails))
}
locationId, _ := uuid.Parse("cadb3810-d47d-4a3c-a234-fe5f3be50138")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1360,7 +1360,7 @@ func (client *ClientImpl) GetTestRunCodeCoverage(ctx context.Context, args GetTe
}
queryParams.Add("flags", strconv.Itoa(*args.Flags))
locationId, _ := uuid.Parse("9629116f-3b89-4ed8-b358-d4694efda160")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1414,7 +1414,7 @@ func (client *ClientImpl) GetTestRuns(ctx context.Context, args GetTestRunsArgs)
queryParams.Add("$top", strconv.Itoa(*args.Top))
}
locationId, _ := uuid.Parse("cadb3810-d47d-4a3c-a234-fe5f3be50138")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1459,7 +1459,7 @@ func (client *ClientImpl) GetTestRunStatistics(ctx context.Context, args GetTest
routeValues["runId"] = strconv.Itoa(*args.RunId)
locationId, _ := uuid.Parse("0a42c424-d764-4a16-a2d5-5c85f87d0ae8")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1505,7 +1505,7 @@ func (client *ClientImpl) GetTestSessions(ctx context.Context, args GetTestSessi
queryParams.Add("includeOnlyCompletedSessions", strconv.FormatBool(*args.IncludeOnlyCompletedSessions))
}
locationId, _ := uuid.Parse("1500b4b4-6c69-4ca6-9b18-35e9e97fe2ac")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1559,7 +1559,7 @@ func (client *ClientImpl) GetTestSubResultAttachmentContent(ctx context.Context,
}
queryParams.Add("testSubResultId", strconv.Itoa(*args.TestSubResultId))
locationId, _ := uuid.Parse("2bffebe9-2f0f-4639-9af8-56129e9fed2d")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/octet-stream", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/octet-stream", nil)
if err != nil {
return nil, err
}
@@ -1603,7 +1603,7 @@ func (client *ClientImpl) GetTestSubResultAttachments(ctx context.Context, args
}
queryParams.Add("testSubResultId", strconv.Itoa(*args.TestSubResultId))
locationId, _ := uuid.Parse("2bffebe9-2f0f-4639-9af8-56129e9fed2d")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1651,7 +1651,7 @@ func (client *ClientImpl) GetTestSubResultAttachmentZip(ctx context.Context, arg
}
queryParams.Add("testSubResultId", strconv.Itoa(*args.TestSubResultId))
locationId, _ := uuid.Parse("2bffebe9-2f0f-4639-9af8-56129e9fed2d")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/zip", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/zip", nil)
if err != nil {
return nil, err
}
@@ -1689,7 +1689,7 @@ func (client *ClientImpl) QueryTestHistory(ctx context.Context, args QueryTestHi
return nil, marshalErr
}
locationId, _ := uuid.Parse("929fd86c-3e38-4d8c-b4b6-90df256e5971")
- resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.2", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.2", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1802,7 +1802,7 @@ func (client *ClientImpl) QueryTestRuns(ctx context.Context, args QueryTestRunsA
queryParams.Add("continuationToken", *args.ContinuationToken)
}
locationId, _ := uuid.Parse("cadb3810-d47d-4a3c-a234-fe5f3be50138")
- resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1853,8 +1853,7 @@ type QueryTestRunsArgs struct {
// Return type for the QueryTestRuns function
type QueryTestRunsResponseValue struct {
- Value []TestRun
- // The continuation token to be used to get the next page of results.
+ Value []TestRun
ContinuationToken string
}
@@ -1880,7 +1879,7 @@ func (client *ClientImpl) RemoveTestCasesFromSuiteUrl(ctx context.Context, args
routeValues["action"] = "TestCases"
locationId, _ := uuid.Parse("a4a1ec1c-b03f-41ca-8857-704594ecf58e")
- _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1", routeValues, nil, nil, "", "application/json", nil)
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
if err != nil {
return err
}
@@ -1916,7 +1915,7 @@ func (client *ClientImpl) UpdateResultRetentionSettings(ctx context.Context, arg
return nil, marshalErr
}
locationId, _ := uuid.Parse("a3206d9e-fa8d-42d3-88cb-f75c51e69cde")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -1963,7 +1962,7 @@ func (client *ClientImpl) UpdateSuiteTestCases(ctx context.Context, args UpdateS
return nil, marshalErr
}
locationId, _ := uuid.Parse("a4a1ec1c-b03f-41ca-8857-704594ecf58e")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2015,7 +2014,7 @@ func (client *ClientImpl) UpdateTestPoints(ctx context.Context, args UpdateTestP
return nil, marshalErr
}
locationId, _ := uuid.Parse("3bcfd5c8-be62-488e-b1da-b8289ce9299c")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2059,7 +2058,7 @@ func (client *ClientImpl) UpdateTestResults(ctx context.Context, args UpdateTest
return nil, marshalErr
}
locationId, _ := uuid.Parse("4637d869-3a76-4468-8057-0bb02aa385cf")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2099,7 +2098,7 @@ func (client *ClientImpl) UpdateTestRun(ctx context.Context, args UpdateTestRunA
return nil, marshalErr
}
locationId, _ := uuid.Parse("cadb3810-d47d-4a3c-a234-fe5f3be50138")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
@@ -2138,7 +2137,7 @@ func (client *ClientImpl) UpdateTestSession(ctx context.Context, args UpdateTest
return nil, marshalErr
}
locationId, _ := uuid.Parse("1500b4b4-6c69-4ca6-9b18-35e9e97fe2ac")
- resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "5.1-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
if err != nil {
return nil, err
}
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/test/models.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/test/models.go
similarity index 93%
rename from vendor/github.com/microsoft/azure-devops-go-api/azuredevops/test/models.go
rename to vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/test/models.go
index b8a0ae751..00107c3e3 100644
--- a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/test/models.go
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/test/models.go
@@ -10,10 +10,10 @@ package test
import (
"github.com/google/uuid"
- "github.com/microsoft/azure-devops-go-api/azuredevops"
- "github.com/microsoft/azure-devops-go-api/azuredevops/core"
- "github.com/microsoft/azure-devops-go-api/azuredevops/system"
- "github.com/microsoft/azure-devops-go-api/azuredevops/webapi"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/core"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/system"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/webapi"
)
type AbortTestRunRequest struct {
@@ -59,6 +59,18 @@ type AggregatedDataForResultTrend struct {
TotalTests *int `json:"totalTests,omitempty"`
}
+// Result deatils for a particular test result outcome.
+type AggregatedResultDetailsByOutcome struct {
+ // Number of results for current outcome.
+ Count *int `json:"count,omitempty"`
+ // Time taken by results.
+ Duration interface{} `json:"duration,omitempty"`
+ // Test result outcome
+ Outcome *TestOutcome `json:"outcome,omitempty"`
+ // Number of results on rerun
+ RerunResultCount *int `json:"rerunResultCount,omitempty"`
+}
+
type AggregatedResultsAnalysis struct {
Duration interface{} `json:"duration,omitempty"`
NotReportedResultsByOutcome *map[TestOutcome]AggregatedResultsByOutcome `json:"notReportedResultsByOutcome,omitempty"`
@@ -80,11 +92,12 @@ type AggregatedResultsByOutcome struct {
}
type AggregatedResultsDifference struct {
- IncreaseInDuration interface{} `json:"increaseInDuration,omitempty"`
- IncreaseInFailures *int `json:"increaseInFailures,omitempty"`
- IncreaseInOtherTests *int `json:"increaseInOtherTests,omitempty"`
- IncreaseInPassedTests *int `json:"increaseInPassedTests,omitempty"`
- IncreaseInTotalTests *int `json:"increaseInTotalTests,omitempty"`
+ IncreaseInDuration interface{} `json:"increaseInDuration,omitempty"`
+ IncreaseInFailures *int `json:"increaseInFailures,omitempty"`
+ IncreaseInNonImpactedTests *int `json:"increaseInNonImpactedTests,omitempty"`
+ IncreaseInOtherTests *int `json:"increaseInOtherTests,omitempty"`
+ IncreaseInPassedTests *int `json:"increaseInPassedTests,omitempty"`
+ IncreaseInTotalTests *int `json:"increaseInTotalTests,omitempty"`
}
type AggregatedRunsByOutcome struct {
@@ -295,6 +308,15 @@ type CloneStatistics struct {
TotalTestCasesCount *int `json:"totalTestCasesCount,omitempty"`
}
+type CloneTestCaseOptions struct {
+ // If set to true, include the attachments
+ IncludeAttachments *bool `json:"includeAttachments,omitempty"`
+ // If set to true, include the links
+ IncludeLinks *bool `json:"includeLinks,omitempty"`
+ // Comment on the link that will link the new clone test case to the original Set null for no comment
+ RelatedLinkComment *string `json:"relatedLinkComment,omitempty"`
+}
+
// Represents the build configuration (platform, flavor) and coverage data for the build
type CodeCoverageData struct {
// Flavor of build for which data is retrieved/published
@@ -394,11 +416,12 @@ var CoverageStatusValues = coverageStatusValuesType{
type CoverageSummaryStatus string
type coverageSummaryStatusValuesType struct {
- None CoverageSummaryStatus
- InProgress CoverageSummaryStatus
- Completed CoverageSummaryStatus
- Finalized CoverageSummaryStatus
- Pending CoverageSummaryStatus
+ None CoverageSummaryStatus
+ InProgress CoverageSummaryStatus
+ Completed CoverageSummaryStatus
+ Finalized CoverageSummaryStatus
+ Pending CoverageSummaryStatus
+ UpdateRequestQueued CoverageSummaryStatus
}
var CoverageSummaryStatusValues = coverageSummaryStatusValuesType{
@@ -412,6 +435,8 @@ var CoverageSummaryStatusValues = coverageSummaryStatusValuesType{
Finalized: "finalized",
// The summary evaluation is pending
Pending: "pending",
+ // Summary evaluation may be ongoing but another merge has been requested.
+ UpdateRequestQueued: "updateRequestQueued",
}
type CreateTestMessageLogEntryRequest struct {
@@ -600,6 +625,8 @@ type FlakySettings struct {
FlakyDetection *FlakyDetection `json:"flakyDetection,omitempty"`
// FlakyInSummaryReport defines flaky data should show in summary report or not.
FlakyInSummaryReport *bool `json:"flakyInSummaryReport,omitempty"`
+ // IsFlakyBugCreated defines if there is any bug that has been created with flaky testresult.
+ IsFlakyBugCreated *bool `json:"isFlakyBugCreated,omitempty"`
// ManualMarkUnmarkFlaky defines manual marking unmarking of flaky testcase.
ManualMarkUnmarkFlaky *bool `json:"manualMarkUnmarkFlaky,omitempty"`
}
@@ -877,6 +904,27 @@ type LinkedWorkItemsQueryResult struct {
WorkItems *[]WorkItemReference `json:"workItems,omitempty"`
}
+// Test summary metrics.
+type Metrics string
+
+type metricsValuesType struct {
+ All Metrics
+ ResultSummary Metrics
+ ResultsAnalysis Metrics
+ RunSummary Metrics
+}
+
+var MetricsValues = metricsValuesType{
+ // To get results of all matrix.
+ All: "all",
+ // Get results summary by results outcome
+ ResultSummary: "resultSummary",
+ // Get results analysis which include failure analysis, increase/decrease in results count analysis.
+ ResultsAnalysis: "resultsAnalysis",
+ // Get runs summary
+ RunSummary: "runSummary",
+}
+
type ModuleCoverage struct {
BlockCount *int `json:"blockCount,omitempty"`
BlockData *[]byte `json:"blockData,omitempty"`
@@ -914,6 +962,11 @@ type NameValuePair struct {
Value *string `json:"value,omitempty"`
}
+type NewTestResultLoggingSettings struct {
+ // LogNewTests defines whether or not we will record new test cases coming into the system
+ LogNewTests *bool `json:"logNewTests,omitempty"`
+}
+
type OperationType string
type operationTypeValuesType struct {
@@ -946,6 +999,20 @@ type PipelineReference struct {
StageReference *StageReference `json:"stageReference,omitempty"`
}
+// Test summary of a pipeline instance.
+type PipelineTestMetrics struct {
+ // Reference of Pipeline instance for which test summary is calculated.
+ CurrentContext *PipelineReference `json:"currentContext,omitempty"`
+ // This is the return value for metric ResultsAnalysis Results insights which include failure analysis, increase/decrease in results count analysis.
+ ResultsAnalysis *ResultsAnalysis `json:"resultsAnalysis,omitempty"`
+ // This is the return value for metric ResultSummary Results summary based on results outcome.
+ ResultSummary *ResultSummary `json:"resultSummary,omitempty"`
+ // This is the return value for metric RunSummary Run summary.
+ RunSummary *RunSummary `json:"runSummary,omitempty"`
+ // Summary at child node.
+ SummaryAtChild *[]PipelineTestMetrics `json:"summaryAtChild,omitempty"`
+}
+
// A model class used for creating and updating test plans.
type PlanUpdateModel struct {
// Area path to which the test plan belongs. This should be set to area path of the team that works on this test plan.
@@ -1216,6 +1283,20 @@ var ResultGroupTypeValues = resultGroupTypeValuesType{
Generic: "generic",
}
+type ResultMetadata string
+
+type resultMetadataValuesType struct {
+ Rerun ResultMetadata
+ Flaky ResultMetadata
+}
+
+var ResultMetadataValues = resultMetadataValuesType{
+ // Rerun metadata
+ Rerun: "rerun",
+ // Flaky metadata
+ Flaky: "flaky",
+}
+
// Additional details with test result metadata
type ResultMetaDataDetails string
@@ -1258,6 +1339,16 @@ type ResultRetentionSettings struct {
ManualResultsRetentionDuration *int `json:"manualResultsRetentionDuration,omitempty"`
}
+// Results insights for runs with state completed and NeedInvestigation.
+type ResultsAnalysis struct {
+ // Reference of pipeline instance from which to compare the results.
+ PreviousContext *PipelineReference `json:"previousContext,omitempty"`
+ // Increase/Decrease in counts of results for a different outcome with respect to PreviousContext.
+ ResultsDifference *AggregatedResultsDifference `json:"resultsDifference,omitempty"`
+ // Failure analysis of results with respect to PreviousContext
+ TestFailuresAnalysis *TestResultFailuresAnalysis `json:"testFailuresAnalysis,omitempty"`
+}
+
type ResultsByQueryRequest struct {
PageSize *int `json:"pageSize,omitempty"`
Query *ResultsStoreQuery `json:"query,omitempty"`
@@ -1290,6 +1381,24 @@ type ResultsStoreQuery struct {
TimeZone *string `json:"timeZone,omitempty"`
}
+// Result summary by the outcome of test results.
+type ResultsSummaryByOutcome struct {
+ // Aggregated result details for each test result outcome.
+ AggregatedResultDetailsByOutcome *map[TestOutcome]AggregatedResultDetailsByOutcome `json:"aggregatedResultDetailsByOutcome,omitempty"`
+ // Time taken by results.
+ Duration interface{} `json:"duration,omitempty"`
+ // Total number of not reported test results.
+ NotReportedTestCount *int `json:"notReportedTestCount,omitempty"`
+ // Total number of test results. (It includes NotImpacted test results as well which need to exclude while calculating pass/fail test result percentage).
+ TotalTestCount *int `json:"totalTestCount,omitempty"`
+}
+
+// Summary of results for a pipeline instance.
+type ResultSummary struct {
+ // Result summary of pipeline, group by TestRun state.
+ ResultSummaryByRunState *map[TestRunState]ResultsSummaryByOutcome `json:"resultSummaryByRunState,omitempty"`
+}
+
type ResultUpdateRequest struct {
ActionResultDeletes *[]TestActionResult `json:"actionResultDeletes,omitempty"`
ActionResults *[]TestActionResult `json:"actionResults,omitempty"`
@@ -1416,10 +1525,26 @@ type RunStatistic struct {
Outcome *string `json:"outcome,omitempty"`
// Test run Resolution State.
ResolutionState *TestResolutionState `json:"resolutionState,omitempty"`
+ // ResultMetadata for the given outcome/count.
+ ResultMetadata *ResultMetadata `json:"resultMetadata,omitempty"`
// State of the test run
State *string `json:"state,omitempty"`
}
+// Summary of runs for a pipeline instance.
+type RunSummary struct {
+ // Total time taken by runs with state completed and NeedInvestigation.
+ Duration interface{} `json:"duration,omitempty"`
+ // NoConfig runs count.
+ NoConfigRunsCount *int `json:"noConfigRunsCount,omitempty"`
+ // Runs count by outcome for runs with state completed and NeedInvestigation runs.
+ RunSummaryByOutcome *map[TestRunOutcome]int `json:"runSummaryByOutcome,omitempty"`
+ // Runs count by state.
+ RunSummaryByState *map[TestRunState]int `json:"runSummaryByState,omitempty"`
+ // Total runs count.
+ TotalRunsCount *int `json:"totalRunsCount,omitempty"`
+}
+
// Run summary for each output type of test.
type RunSummaryModel struct {
// Total time taken in milliseconds.
@@ -2119,14 +2244,16 @@ type TestIterationDetailsModel struct {
// Represents Test Log Result object.
type TestLog struct {
// Test Log Context run, build
- LogReference *TestLogReference `json:"logReference,omitempty"`
- MetaData *map[string]string `json:"metaData,omitempty"`
+ LogReference *TestLogReference `json:"logReference,omitempty"`
+ // Meta data for Log file
+ MetaData *map[string]string `json:"metaData,omitempty"`
// LastUpdatedDate for Log file
ModifiedOn *azuredevops.Time `json:"modifiedOn,omitempty"`
// Size in Bytes for Log file
Size *uint64 `json:"size,omitempty"`
}
+// Test Log Reference object
type TestLogReference struct {
// BuildId for test log, if context is build
BuildId *int `json:"buildId,omitempty"`
@@ -2140,7 +2267,7 @@ type TestLogReference struct {
ResultId *int `json:"resultId,omitempty"`
// runid for test log, if context is run
RunId *int `json:"runId,omitempty"`
- // Test Log Reference object
+ // Test Log Scope
Scope *TestLogScope `json:"scope,omitempty"`
// SubResultid for test log, if context is run and log is related to subresult
SubResultId *int `json:"subResultId,omitempty"`
@@ -2152,18 +2279,12 @@ type TestLogReference struct {
type TestLogScope string
type testLogScopeValuesType struct {
- Run TestLogScope
- Build TestLogScope
- Release TestLogScope
+ Run TestLogScope
}
var TestLogScopeValues = testLogScopeValuesType{
// Log file is associated with Run, result, subresult
Run: "run",
- // Log File associated with Build
- Build: "build",
- // Log File associated with Release
- Release: "release",
}
// Represents Test Log Status object.
@@ -2180,41 +2301,60 @@ type TestLogStatus struct {
type TestLogStatusCode string
type testLogStatusCodeValuesType struct {
- Success TestLogStatusCode
- Failed TestLogStatusCode
- FileAlreadyExists TestLogStatusCode
- InvalidInput TestLogStatusCode
- InvalidFileName TestLogStatusCode
- InvalidContainer TestLogStatusCode
- TransferFailed TestLogStatusCode
- FeatureDisabled TestLogStatusCode
- BuildDoesNotExist TestLogStatusCode
- RunDoesNotExist TestLogStatusCode
- ContainerNotCreated TestLogStatusCode
- ApiNotSupported TestLogStatusCode
- FileSizeExceeds TestLogStatusCode
- ContainerNotFound TestLogStatusCode
- FileNotFound TestLogStatusCode
- DirectoryNotFound TestLogStatusCode
+ Success TestLogStatusCode
+ Failed TestLogStatusCode
+ FileAlreadyExists TestLogStatusCode
+ InvalidInput TestLogStatusCode
+ InvalidFileName TestLogStatusCode
+ InvalidContainer TestLogStatusCode
+ TransferFailed TestLogStatusCode
+ FeatureDisabled TestLogStatusCode
+ BuildDoesNotExist TestLogStatusCode
+ RunDoesNotExist TestLogStatusCode
+ ContainerNotCreated TestLogStatusCode
+ ApiNotSupported TestLogStatusCode
+ FileSizeExceeds TestLogStatusCode
+ ContainerNotFound TestLogStatusCode
+ FileNotFound TestLogStatusCode
+ DirectoryNotFound TestLogStatusCode
+ StorageCapacityExceeded TestLogStatusCode
}
var TestLogStatusCodeValues = testLogStatusCodeValuesType{
- Success: "success",
- Failed: "failed",
- FileAlreadyExists: "fileAlreadyExists",
- InvalidInput: "invalidInput",
- InvalidFileName: "invalidFileName",
- InvalidContainer: "invalidContainer",
- TransferFailed: "transferFailed",
- FeatureDisabled: "featureDisabled",
- BuildDoesNotExist: "buildDoesNotExist",
- RunDoesNotExist: "runDoesNotExist",
+ // Operation is successful
+ Success: "success",
+ // Operation failed
+ Failed: "failed",
+ // Operation failed due to file already exist
+ FileAlreadyExists: "fileAlreadyExists",
+ // Invalid input provided by user
+ InvalidInput: "invalidInput",
+ // Invalid file name provided by user
+ InvalidFileName: "invalidFileName",
+ // Error occurred while operating on container
+ InvalidContainer: "invalidContainer",
+ // Blob Transfer Error
+ TransferFailed: "transferFailed",
+ // TestLogStore feature is not enabled
+ FeatureDisabled: "featureDisabled",
+ // Build for which operation is requested does not exist
+ BuildDoesNotExist: "buildDoesNotExist",
+ // Run for which operation is requested does not exist
+ RunDoesNotExist: "runDoesNotExist",
+ // Container cannot be created
ContainerNotCreated: "containerNotCreated",
- ApiNotSupported: "apiNotSupported",
- FileSizeExceeds: "fileSizeExceeds",
- ContainerNotFound: "containerNotFound",
- FileNotFound: "fileNotFound",
- DirectoryNotFound: "directoryNotFound",
+ // Api is not supported
+ ApiNotSupported: "apiNotSupported",
+ // File size is greater than the limitation
+ FileSizeExceeds: "fileSizeExceeds",
+ // Container is not found for which operation is requested
+ ContainerNotFound: "containerNotFound",
+ // File cannot be found
+ FileNotFound: "fileNotFound",
+ // Directory cannot be found
+ DirectoryNotFound: "directoryNotFound",
+ // Storage capacity exceeded
+ StorageCapacityExceeded: "storageCapacityExceeded",
}
// Represents Test Log store endpoint details.
@@ -2227,6 +2367,7 @@ type TestLogStoreEndpointDetails struct {
Status *TestLogStatusCode `json:"status,omitempty"`
}
+// Specifies set of possible log store endpoint type.
type TestLogStoreEndpointType string
type testLogStoreEndpointTypeValuesType struct {
@@ -2235,22 +2376,22 @@ type testLogStoreEndpointTypeValuesType struct {
}
var TestLogStoreEndpointTypeValues = testLogStoreEndpointTypeValuesType{
+ // Endpoint type is scoped to root
Root: "root",
+ // Endpoint type is scoped to file
File: "file",
}
+// Specifies set of possible operation type on log store.
type TestLogStoreOperationType string
type testLogStoreOperationTypeValuesType struct {
- Read TestLogStoreOperationType
- Create TestLogStoreOperationType
- ReadAndCreate TestLogStoreOperationType
+ Read TestLogStoreOperationType
}
var TestLogStoreOperationTypeValues = testLogStoreOperationTypeValuesType{
- Read: "read",
- Create: "create",
- ReadAndCreate: "readAndCreate",
+ // Operation is scoped to read data only.
+ Read: "read",
}
// Test Log Types
@@ -2258,20 +2399,11 @@ type TestLogType string
type testLogTypeValuesType struct {
GeneralAttachment TestLogType
- CodeCoverage TestLogType
- TestImpact TestLogType
- Intermediate TestLogType
}
var TestLogTypeValues = testLogTypeValuesType{
// Any gereric attachment.
GeneralAttachment: "generalAttachment",
- // Code Coverage files
- CodeCoverage: "codeCoverage",
- // Test Impact details.
- TestImpact: "testImpact",
- // Temporary files
- Intermediate: "intermediate",
}
type TestMessageLog2 struct {
@@ -2650,6 +2782,12 @@ type TestResultDocument struct {
Payload *TestResultPayload `json:"payload,omitempty"`
}
+type TestResultFailuresAnalysis struct {
+ ExistingFailures *TestFailureDetails `json:"existingFailures,omitempty"`
+ FixedTests *TestFailureDetails `json:"fixedTests,omitempty"`
+ NewFailures *TestFailureDetails `json:"newFailures,omitempty"`
+}
+
// Group by for results
type TestResultGroupBy string
@@ -2771,21 +2909,24 @@ type TestResultReset2 struct {
}
type TestResultsContext struct {
- Build *BuildReference `json:"build,omitempty"`
- ContextType *TestResultsContextType `json:"contextType,omitempty"`
- Release *ReleaseReference `json:"release,omitempty"`
+ Build *BuildReference `json:"build,omitempty"`
+ ContextType *TestResultsContextType `json:"contextType,omitempty"`
+ PipelineReference *PipelineReference `json:"pipelineReference,omitempty"`
+ Release *ReleaseReference `json:"release,omitempty"`
}
type TestResultsContextType string
type testResultsContextTypeValuesType struct {
- Build TestResultsContextType
- Release TestResultsContextType
+ Build TestResultsContextType
+ Release TestResultsContextType
+ Pipeline TestResultsContextType
}
var TestResultsContextTypeValues = testResultsContextTypeValuesType{
- Build: "build",
- Release: "release",
+ Build: "build",
+ Release: "release",
+ Pipeline: "pipeline",
}
type TestResultsDetails struct {
@@ -2839,14 +2980,16 @@ type TestResultsQuery struct {
type TestResultsSettings struct {
// IsRequired and EmitDefaultValue are passed as false as if users doesn't pass anything, should not come for serialisation and deserialisation.
- FlakySettings *FlakySettings `json:"flakySettings,omitempty"`
+ FlakySettings *FlakySettings `json:"flakySettings,omitempty"`
+ NewTestResultLoggingSettings *NewTestResultLoggingSettings `json:"newTestResultLoggingSettings,omitempty"`
}
type TestResultsSettingsType string
type testResultsSettingsTypeValuesType struct {
- All TestResultsSettingsType
- Flaky TestResultsSettingsType
+ All TestResultsSettingsType
+ Flaky TestResultsSettingsType
+ NewTestLogging TestResultsSettingsType
}
var TestResultsSettingsTypeValues = testResultsSettingsTypeValuesType{
@@ -2854,6 +2997,8 @@ var TestResultsSettingsTypeValues = testResultsSettingsTypeValuesType{
All: "all",
// Returns Flaky Test Settings.
Flaky: "flaky",
+ // Returns whether to log new tests or not
+ NewTestLogging: "newTestLogging",
}
type TestResultSummary struct {
@@ -2868,6 +3013,8 @@ type TestResultSummary struct {
type TestResultsUpdateSettings struct {
// FlakySettings defines Flaky Settings Data.
FlakySettings *FlakySettings `json:"flakySettings,omitempty"`
+ // NewTestResultLoggingSettings defines the setting for logging new test results
+ NewTestResultLoggingSettings *NewTestResultLoggingSettings `json:"newTestResultLoggingSettings,omitempty"`
}
type TestResultsWithWatermark struct {
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/version.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/version.go
new file mode 100644
index 000000000..443147c51
--- /dev/null
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/version.go
@@ -0,0 +1,58 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package azuredevops
+
+import (
+ "strconv"
+ "strings"
+)
+
+type Version struct {
+ Major int
+ Minor int
+}
+
+func NewVersion(version string) (*Version, error) {
+ split := strings.Split(version, ".")
+ if len(split) > 1 {
+ major, err := strconv.Atoi(split[0])
+ if err != nil {
+ return nil, err
+ }
+ minor, err := strconv.Atoi(split[1])
+ if err != nil {
+ return nil, err
+ }
+ return &Version{
+ Major: major,
+ Minor: minor,
+ }, nil
+ }
+ return nil, &InvalidVersionStringError{version: version}
+}
+
+func (version Version) CompareTo(compareToVersion Version) int {
+ if version.Major > compareToVersion.Major {
+ return 1
+ } else if version.Major < compareToVersion.Major {
+ return -1
+ } else if version.Minor > compareToVersion.Minor {
+ return 1
+ } else if version.Minor < compareToVersion.Minor {
+ return -1
+ }
+ return 0
+}
+
+func (version Version) String() string {
+ return strconv.Itoa(version.Major) + "." + strconv.Itoa(version.Minor)
+}
+
+type InvalidVersionStringError struct {
+ version string
+}
+
+func (e *InvalidVersionStringError) Error() string {
+ return "The version string was invalid: " + e.version
+}
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/versionnegotiation.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/versionnegotiation.go
new file mode 100644
index 000000000..f1a2a2f33
--- /dev/null
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/versionnegotiation.go
@@ -0,0 +1,72 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package azuredevops
+
+import "strconv"
+
+func negotiateRequestVersion(location *ApiResourceLocation, apiVersion string) (string, error) {
+ if apiVersion == "" {
+ // if no api-version is sent to the server, the server will decide the version. The server uses the latest
+ // released version if the endpoint has been released, otherwise it will use the latest preview version.
+ return apiVersion, nil
+ }
+
+ matches := apiVersionRegEx.FindStringSubmatch(apiVersion)
+ if len(matches) == 0 && matches[0] != "" {
+ return apiVersion, &InvalidApiVersion{apiVersion}
+ }
+
+ requestedApiVersion, err := NewVersion(matches[1])
+ if err != nil {
+ return apiVersion, err
+ }
+ locationMinVersion, err := NewVersion(*location.MinVersion)
+ if err != nil {
+ return apiVersion, err
+ }
+ if locationMinVersion.CompareTo(*requestedApiVersion) > 0 {
+ // Client is older than the server. The server no longer supports this
+ // resource (deprecated).
+ return apiVersion, nil
+ } else {
+ locationMaxVersion, err := NewVersion(*location.MaxVersion)
+ if err != nil {
+ return apiVersion, err
+ }
+ if locationMaxVersion.CompareTo(*requestedApiVersion) < 0 {
+ // Client is newer than the server. Negotiate down to the latest version
+ // on the server
+ negotiatedVersion := string(*location.MaxVersion)
+ if *location.ReleasedVersion < *location.MaxVersion {
+ negotiatedVersion += "-preview"
+ }
+ return negotiatedVersion, nil
+ } else {
+ // We can send at the requested api version. Make sure the resource version
+ // is not bigger than what the server supports
+ negotiatedVersion := matches[1]
+ if len(matches) > 3 && matches[3] != "" { // matches '-preview'
+ negotiatedVersion += "-preview"
+ if len(matches) > 5 && matches[5] != "" { // has a resource version
+ requestedResourceVersion, _ := strconv.Atoi(matches[5])
+ if *location.ResourceVersion < requestedResourceVersion {
+ negotiatedVersion += "." + strconv.Itoa(*location.ResourceVersion)
+ } else {
+ negotiatedVersion += "." + matches[5]
+ }
+ }
+ } else {
+ // requesting released version, ensure server supports a released version, and if not append '-preview'
+ locationReleasedVersion, err := NewVersion(*location.ReleasedVersion)
+ if err != nil {
+ return apiVersion, err
+ }
+ if (locationReleasedVersion.Major == 0 && locationReleasedVersion.Minor == 0) || locationReleasedVersion.CompareTo(*requestedApiVersion) < 0 {
+ negotiatedVersion += "-preview"
+ }
+ }
+ return negotiatedVersion, nil
+ }
+ }
+}
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/webapi/models.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/webapi/models.go
new file mode 100644
index 000000000..6853293b4
--- /dev/null
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/webapi/models.go
@@ -0,0 +1,337 @@
+// --------------------------------------------------------------------------------------------
+// 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 webapi
+
+import (
+ "github.com/google/uuid"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/system"
+)
+
+// Information about the location of a REST API resource
+type ApiResourceLocation struct {
+ // Area name for this resource
+ Area *string `json:"area,omitempty"`
+ // Unique Identifier for this location
+ Id *uuid.UUID `json:"id,omitempty"`
+ // Maximum api version that this resource supports (current server version for this resource)
+ MaxVersion *string `json:"maxVersion,omitempty"`
+ // Minimum api version that this resource supports
+ MinVersion *string `json:"minVersion,omitempty"`
+ // The latest version of this resource location that is in "Release" (non-preview) mode
+ ReleasedVersion *string `json:"releasedVersion,omitempty"`
+ // Resource name
+ ResourceName *string `json:"resourceName,omitempty"`
+ // The current resource version supported by this resource location
+ ResourceVersion *int `json:"resourceVersion,omitempty"`
+ // This location's route template (templated relative path)
+ RouteTemplate *string `json:"routeTemplate,omitempty"`
+}
+
+// [Flags] Enumeration of the options that can be passed in on Connect.
+type ConnectOptions string
+
+type connectOptionsValuesType struct {
+ None ConnectOptions
+ IncludeServices ConnectOptions
+ IncludeLastUserAccess ConnectOptions
+ IncludeInheritedDefinitionsOnly ConnectOptions
+ IncludeNonInheritedDefinitionsOnly ConnectOptions
+}
+
+var ConnectOptionsValues = connectOptionsValuesType{
+ // Retrieve no optional data.
+ None: "none",
+ // Includes information about AccessMappings and ServiceDefinitions.
+ IncludeServices: "includeServices",
+ // Includes the last user access for this host.
+ IncludeLastUserAccess: "includeLastUserAccess",
+ // This is only valid on the deployment host and when true. Will only return inherited definitions.
+ IncludeInheritedDefinitionsOnly: "includeInheritedDefinitionsOnly",
+ // When true will only return non inherited definitions. Only valid at non-deployment host.
+ IncludeNonInheritedDefinitionsOnly: "includeNonInheritedDefinitionsOnly",
+}
+
+// [Flags]
+type DeploymentFlags string
+
+type deploymentFlagsValuesType struct {
+ None DeploymentFlags
+ Hosted DeploymentFlags
+ OnPremises DeploymentFlags
+}
+
+var DeploymentFlagsValues = deploymentFlagsValuesType{
+ None: "none",
+ Hosted: "hosted",
+ OnPremises: "onPremises",
+}
+
+// Defines an "actor" for an event.
+type EventActor struct {
+ // Required: This is the identity of the user for the specified role.
+ Id *uuid.UUID `json:"id,omitempty"`
+ // Required: The event specific name of a role.
+ Role *string `json:"role,omitempty"`
+}
+
+// Defines a scope for an event.
+type EventScope struct {
+ // Required: This is the identity of the scope for the type.
+ Id *uuid.UUID `json:"id,omitempty"`
+ // Optional: The display name of the scope
+ Name *string `json:"name,omitempty"`
+ // Required: The event specific type of a scope.
+ Type *string `json:"type,omitempty"`
+}
+
+type IdentityRef struct {
+ // This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject.
+ Links interface{} `json:"_links,omitempty"`
+ // The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations.
+ Descriptor *string `json:"descriptor,omitempty"`
+ // This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider.
+ DisplayName *string `json:"displayName,omitempty"`
+ // This url is the full route to the source resource of this graph subject.
+ Url *string `json:"url,omitempty"`
+ // Deprecated - Can be retrieved by querying the Graph user referenced in the "self" entry of the IdentityRef "_links" dictionary
+ DirectoryAlias *string `json:"directoryAlias,omitempty"`
+ Id *string `json:"id,omitempty"`
+ // Deprecated - Available in the "avatar" entry of the IdentityRef "_links" dictionary
+ ImageUrl *string `json:"imageUrl,omitempty"`
+ // Deprecated - Can be retrieved by querying the Graph membership state referenced in the "membershipState" entry of the GraphUser "_links" dictionary
+ Inactive *bool `json:"inactive,omitempty"`
+ // Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsAadUserType/Descriptor.IsAadGroupType)
+ IsAadIdentity *bool `json:"isAadIdentity,omitempty"`
+ // Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsGroupType)
+ IsContainer *bool `json:"isContainer,omitempty"`
+ IsDeletedInOrigin *bool `json:"isDeletedInOrigin,omitempty"`
+ // Deprecated - not in use in most preexisting implementations of ToIdentityRef
+ ProfileUrl *string `json:"profileUrl,omitempty"`
+ // Deprecated - use Domain+PrincipalName instead
+ UniqueName *string `json:"uniqueName,omitempty"`
+}
+
+type IdentityRefWithEmail struct {
+ // This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject.
+ Links interface{} `json:"_links,omitempty"`
+ // The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations.
+ Descriptor *string `json:"descriptor,omitempty"`
+ // This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider.
+ DisplayName *string `json:"displayName,omitempty"`
+ // This url is the full route to the source resource of this graph subject.
+ Url *string `json:"url,omitempty"`
+ // Deprecated - Can be retrieved by querying the Graph user referenced in the "self" entry of the IdentityRef "_links" dictionary
+ DirectoryAlias *string `json:"directoryAlias,omitempty"`
+ Id *string `json:"id,omitempty"`
+ // Deprecated - Available in the "avatar" entry of the IdentityRef "_links" dictionary
+ ImageUrl *string `json:"imageUrl,omitempty"`
+ // Deprecated - Can be retrieved by querying the Graph membership state referenced in the "membershipState" entry of the GraphUser "_links" dictionary
+ Inactive *bool `json:"inactive,omitempty"`
+ // Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsAadUserType/Descriptor.IsAadGroupType)
+ IsAadIdentity *bool `json:"isAadIdentity,omitempty"`
+ // Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsGroupType)
+ IsContainer *bool `json:"isContainer,omitempty"`
+ IsDeletedInOrigin *bool `json:"isDeletedInOrigin,omitempty"`
+ // Deprecated - not in use in most preexisting implementations of ToIdentityRef
+ ProfileUrl *string `json:"profileUrl,omitempty"`
+ // Deprecated - use Domain+PrincipalName instead
+ UniqueName *string `json:"uniqueName,omitempty"`
+ PreferredEmailAddress *string `json:"preferredEmailAddress,omitempty"`
+}
+
+// The JSON model for a JSON Patch operation
+type JsonPatchOperation struct {
+ // The path to copy from for the Move/Copy operation.
+ From *string `json:"from,omitempty"`
+ // The patch operation
+ Op *Operation `json:"op,omitempty"`
+ // The path for the operation. In the case of an array, a zero based index can be used to specify the position in the array (e.g. /biscuits/0/name). The "-" character can be used instead of an index to insert at the end of the array (e.g. /biscuits/-).
+ Path *string `json:"path,omitempty"`
+ // The value for the operation. This is either a primitive or a JToken.
+ Value interface{} `json:"value,omitempty"`
+}
+
+type JsonWebToken struct {
+ // Gets a value indicating whether or not this token has been successfully authenticated with the remote server.
+ IsAuthenticated *bool `json:"isAuthenticated,omitempty"`
+ // Metadata about the token in a collection of properties.
+ Properties *map[string]string `json:"properties,omitempty"`
+}
+
+type JWTAlgorithm string
+
+type jwtAlgorithmValuesType struct {
+ None JWTAlgorithm
+ HS256 JWTAlgorithm
+ RS256 JWTAlgorithm
+}
+
+var JWTAlgorithmValues = jwtAlgorithmValuesType{
+ None: "none",
+ HS256: "hS256",
+ RS256: "rS256",
+}
+
+type Operation string
+
+type operationValuesType struct {
+ Add Operation
+ Remove Operation
+ Replace Operation
+ Move Operation
+ Copy Operation
+ Test Operation
+}
+
+var OperationValues = operationValuesType{
+ Add: "add",
+ Remove: "remove",
+ Replace: "replace",
+ Move: "move",
+ Copy: "copy",
+ Test: "test",
+}
+
+// Represents the public key portion of an RSA asymmetric key.
+type PublicKey struct {
+ // Gets or sets the exponent for the public key.
+ Exponent *[]byte `json:"exponent,omitempty"`
+ // Gets or sets the modulus for the public key.
+ Modulus *[]byte `json:"modulus,omitempty"`
+}
+
+type Publisher struct {
+ // Name of the publishing service.
+ Name *string `json:"name,omitempty"`
+ // Service Owner Guid Eg. Tfs : 00025394-6065-48CA-87D9-7F5672854EF7
+ ServiceOwnerId *uuid.UUID `json:"serviceOwnerId,omitempty"`
+}
+
+// The class to represent a REST reference link. RFC: http://tools.ietf.org/html/draft-kelly-json-hal-06 The RFC is not fully implemented, additional properties are allowed on the reference link but as of yet we don't have a need for them.
+type ReferenceLink struct {
+ Href *string `json:"href,omitempty"`
+}
+
+type ResourceRef struct {
+ Id *string `json:"id,omitempty"`
+ Url *string `json:"url,omitempty"`
+}
+
+type ServiceEvent struct {
+ // This is the id of the type. Constants that will be used by subscribers to identify/filter events being published on a topic.
+ EventType *string `json:"eventType,omitempty"`
+ // This is the service that published this event.
+ Publisher *Publisher `json:"publisher,omitempty"`
+ // The resource object that carries specific information about the event. The object must have the ServiceEventObject applied for serialization/deserialization to work.
+ Resource interface{} `json:"resource,omitempty"`
+ // This dictionary carries the context descriptors along with their ids.
+ ResourceContainers *map[string]interface{} `json:"resourceContainers,omitempty"`
+ // This is the version of the resource.
+ ResourceVersion *string `json:"resourceVersion,omitempty"`
+}
+
+// A signed url allowing limited-time anonymous access to private resources.
+type SignedUrl struct {
+ // Timestamp when access expires.
+ SignatureExpires *azuredevops.Time `json:"signatureExpires,omitempty"`
+ // The URL to allow access to.
+ Url *string `json:"url,omitempty"`
+}
+
+type TeamMember struct {
+ Identity *IdentityRef `json:"identity,omitempty"`
+ IsTeamAdmin *bool `json:"isTeamAdmin,omitempty"`
+}
+
+// A single secured timing consisting of a duration and start time
+type TimingEntry struct {
+ // Duration of the entry in ticks
+ ElapsedTicks *uint64 `json:"elapsedTicks,omitempty"`
+ // Properties to distinguish timings within the same group or to provide data to send with telemetry
+ Properties *map[string]interface{} `json:"properties,omitempty"`
+ // Offset from Server Request Context start time in microseconds
+ StartOffset *uint64 `json:"startOffset,omitempty"`
+}
+
+// A set of secured performance timings all keyed off of the same string
+type TimingGroup struct {
+ // The total number of timing entries associated with this group
+ Count *int `json:"count,omitempty"`
+ // Overall duration of all entries in this group in ticks
+ ElapsedTicks *uint64 `json:"elapsedTicks,omitempty"`
+ // A list of timing entries in this group. Only the first few entries in each group are collected.
+ Timings *[]TimingEntry `json:"timings,omitempty"`
+}
+
+// This class describes a trace filter, i.e. a set of criteria on whether or not a trace event should be emitted
+type TraceFilter struct {
+ Area *string `json:"area,omitempty"`
+ ExceptionType *string `json:"exceptionType,omitempty"`
+ IsEnabled *bool `json:"isEnabled,omitempty"`
+ Layer *string `json:"layer,omitempty"`
+ Level *system.TraceLevel `json:"level,omitempty"`
+ Method *string `json:"method,omitempty"`
+ // Used to serialize additional identity information (display name, etc) to clients. Not set by default. Server-side callers should use OwnerId.
+ Owner *IdentityRef `json:"owner,omitempty"`
+ OwnerId *uuid.UUID `json:"ownerId,omitempty"`
+ Path *string `json:"path,omitempty"`
+ ProcessName *string `json:"processName,omitempty"`
+ Service *string `json:"service,omitempty"`
+ ServiceHost *uuid.UUID `json:"serviceHost,omitempty"`
+ TimeCreated *azuredevops.Time `json:"timeCreated,omitempty"`
+ TraceId *uuid.UUID `json:"traceId,omitempty"`
+ Tracepoint *int `json:"tracepoint,omitempty"`
+ Uri *string `json:"uri,omitempty"`
+ UserAgent *string `json:"userAgent,omitempty"`
+ UserLogin *string `json:"userLogin,omitempty"`
+}
+
+type VssJsonCollectionWrapper struct {
+ Count *int `json:"count,omitempty"`
+ Value *[]interface{} `json:"value,omitempty"`
+}
+
+type VssJsonCollectionWrapperBase struct {
+ Count *int `json:"count,omitempty"`
+}
+
+// This is the type used for firing notifications intended for the subsystem in the Notifications SDK. For components that can't take a dependency on the Notifications SDK directly, they can use ITeamFoundationEventService.PublishNotification and the Notifications SDK ISubscriber implementation will get it.
+type VssNotificationEvent struct {
+ // Optional: A list of actors which are additional identities with corresponding roles that are relevant to the event.
+ Actors *[]EventActor `json:"actors,omitempty"`
+ // Optional: A list of artifacts referenced or impacted by this event.
+ ArtifactUris *[]string `json:"artifactUris,omitempty"`
+ // Required: The event payload. If Data is a string, it must be in Json or XML format. Otherwise it must have a serialization format attribute.
+ Data interface{} `json:"data,omitempty"`
+ // Required: The name of the event. This event must be registered in the context it is being fired.
+ EventType *string `json:"eventType,omitempty"`
+ // How long before the event expires and will be cleaned up. The default is to use the system default.
+ ExpiresIn interface{} `json:"expiresIn,omitempty"`
+ // The id of the item, artifact, extension, project, etc.
+ ItemId *string `json:"itemId,omitempty"`
+ // How long to wait before processing this event. The default is to process immediately.
+ ProcessDelay interface{} `json:"processDelay,omitempty"`
+ // Optional: A list of scopes which are are relevant to the event.
+ Scopes *[]EventScope `json:"scopes,omitempty"`
+ // This is the time the original source event for this VssNotificationEvent was created. For example, for something like a build completion notification SourceEventCreatedTime should be the time the build finished not the time this event was raised.
+ SourceEventCreatedTime *azuredevops.Time `json:"sourceEventCreatedTime,omitempty"`
+}
+
+type WrappedException struct {
+ CustomProperties *map[string]interface{} `json:"customProperties,omitempty"`
+ ErrorCode *int `json:"errorCode,omitempty"`
+ EventId *int `json:"eventId,omitempty"`
+ HelpLink *string `json:"helpLink,omitempty"`
+ InnerException *WrappedException `json:"innerException,omitempty"`
+ Message *string `json:"message,omitempty"`
+ StackTrace *string `json:"stackTrace,omitempty"`
+ TypeKey *string `json:"typeKey,omitempty"`
+ TypeName *string `json:"typeName,omitempty"`
+}
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/workitemtracking/client.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/workitemtracking/client.go
new file mode 100644
index 000000000..7080c6d7f
--- /dev/null
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/workitemtracking/client.go
@@ -0,0 +1,3425 @@
+// --------------------------------------------------------------------------------------------
+// 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 workitemtracking
+
+import (
+ "bytes"
+ "context"
+ "encoding/json"
+ "github.com/google/uuid"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/webapi"
+ "io"
+ "net/http"
+ "net/url"
+ "strconv"
+ "strings"
+)
+
+var ResourceAreaId, _ = uuid.Parse("5264459e-e5e0-4bd8-b118-0985e68a4ec5")
+
+type Client interface {
+ // [Preview API] Add a comment on a work item.
+ AddComment(context.Context, AddCommentArgs) (*Comment, error)
+ // Uploads an attachment.
+ CreateAttachment(context.Context, CreateAttachmentArgs) (*AttachmentReference, error)
+ // [Preview API] Adds a new reaction to a comment.
+ CreateCommentReaction(context.Context, CreateCommentReactionArgs) (*CommentReaction, error)
+ // Create a new field.
+ CreateField(context.Context, CreateFieldArgs) (*WorkItemField, error)
+ // Create new or update an existing classification node.
+ CreateOrUpdateClassificationNode(context.Context, CreateOrUpdateClassificationNodeArgs) (*WorkItemClassificationNode, error)
+ // Creates a query, or moves a query.
+ CreateQuery(context.Context, CreateQueryArgs) (*QueryHierarchyItem, error)
+ // [Preview API] Creates a template
+ CreateTemplate(context.Context, CreateTemplateArgs) (*WorkItemTemplate, error)
+ // Creates a single work item.
+ CreateWorkItem(context.Context, CreateWorkItemArgs) (*WorkItem, error)
+ // Delete an existing classification node.
+ DeleteClassificationNode(context.Context, DeleteClassificationNodeArgs) error
+ // [Preview API] Delete a comment on a work item.
+ DeleteComment(context.Context, DeleteCommentArgs) error
+ // [Preview API] Deletes an existing reaction on a comment.
+ DeleteCommentReaction(context.Context, DeleteCommentReactionArgs) (*CommentReaction, error)
+ // Deletes the field. To undelete a filed, see "Update Field" API.
+ DeleteField(context.Context, DeleteFieldArgs) error
+ // Delete a query or a folder. This deletes any permission change on the deleted query or folder and any of its descendants if it is a folder. It is important to note that the deleted permission changes cannot be recovered upon undeleting the query or folder.
+ DeleteQuery(context.Context, DeleteQueryArgs) error
+ // [Preview API]
+ DeleteTag(context.Context, DeleteTagArgs) error
+ // [Preview API] Deletes the template with given id
+ DeleteTemplate(context.Context, DeleteTemplateArgs) error
+ // Deletes the specified work item and sends it to the Recycle Bin, so that it can be restored back, if required. Optionally, if the destroy parameter has been set to true, it destroys the work item permanently. WARNING: If the destroy parameter is set to true, work items deleted by this command will NOT go to recycle-bin and there is no way to restore/recover them after deletion. It is recommended NOT to use this parameter. If you do, please use this parameter with extreme caution.
+ DeleteWorkItem(context.Context, DeleteWorkItemArgs) (*WorkItemDelete, error)
+ // Destroys the specified work item permanently from the Recycle Bin. This action can not be undone.
+ DestroyWorkItem(context.Context, DestroyWorkItemArgs) error
+ // Downloads an attachment.
+ GetAttachmentContent(context.Context, GetAttachmentContentArgs) (io.ReadCloser, error)
+ // Downloads an attachment.
+ GetAttachmentZip(context.Context, GetAttachmentZipArgs) (io.ReadCloser, error)
+ // Gets the classification node for a given node path.
+ GetClassificationNode(context.Context, GetClassificationNodeArgs) (*WorkItemClassificationNode, error)
+ // Gets root classification nodes or list of classification nodes for a given list of nodes ids, for a given project. In case ids parameter is supplied you will get list of classification nodes for those ids. Otherwise you will get root classification nodes for this project.
+ GetClassificationNodes(context.Context, GetClassificationNodesArgs) (*[]WorkItemClassificationNode, error)
+ // [Preview API] Returns a work item comment.
+ GetComment(context.Context, GetCommentArgs) (*Comment, error)
+ // [Preview API] Gets reactions of a comment.
+ GetCommentReactions(context.Context, GetCommentReactionsArgs) (*[]CommentReaction, error)
+ // [Preview API] Returns a list of work item comments, pageable.
+ GetComments(context.Context, GetCommentsArgs) (*CommentList, error)
+ // [Preview API] Returns a list of work item comments by ids.
+ GetCommentsBatch(context.Context, GetCommentsBatchArgs) (*CommentList, error)
+ // [Preview API]
+ GetCommentVersion(context.Context, GetCommentVersionArgs) (*CommentVersion, error)
+ // [Preview API]
+ GetCommentVersions(context.Context, GetCommentVersionsArgs) (*[]CommentVersion, error)
+ // Gets a deleted work item from Recycle Bin.
+ GetDeletedWorkItem(context.Context, GetDeletedWorkItemArgs) (*WorkItemDelete, error)
+ // Gets the work items from the recycle bin, whose IDs have been specified in the parameters
+ GetDeletedWorkItems(context.Context, GetDeletedWorkItemsArgs) (*[]WorkItemDeleteReference, error)
+ // Gets a list of the IDs and the URLs of the deleted the work items in the Recycle Bin.
+ GetDeletedWorkItemShallowReferences(context.Context, GetDeletedWorkItemShallowReferencesArgs) (*[]WorkItemDeleteShallowReference, error)
+ // [Preview API] Get users who reacted on the comment.
+ GetEngagedUsers(context.Context, GetEngagedUsersArgs) (*[]webapi.IdentityRef, error)
+ // Gets information on a specific field.
+ GetField(context.Context, GetFieldArgs) (*WorkItemField, error)
+ // Returns information for all fields. The project ID/name parameter is optional.
+ GetFields(context.Context, GetFieldsArgs) (*[]WorkItemField, error)
+ // Gets the root queries and their children
+ GetQueries(context.Context, GetQueriesArgs) (*[]QueryHierarchyItem, error)
+ // Gets a list of queries by ids (Maximum 1000)
+ GetQueriesBatch(context.Context, GetQueriesBatchArgs) (*[]QueryHierarchyItem, error)
+ // Retrieves an individual query and its children
+ GetQuery(context.Context, GetQueryArgs) (*QueryHierarchyItem, error)
+ // Gets the results of the query given the query ID.
+ GetQueryResultCount(context.Context, GetQueryResultCountArgs) (*int, error)
+ // [Preview API] Gets recent work item activities
+ GetRecentActivityData(context.Context, GetRecentActivityDataArgs) (*[]AccountRecentActivityWorkItemModel2, error)
+ // Gets the work item relation type definition.
+ GetRelationType(context.Context, GetRelationTypeArgs) (*WorkItemRelationType, error)
+ // Gets the work item relation types.
+ GetRelationTypes(context.Context, GetRelationTypesArgs) (*[]WorkItemRelationType, error)
+ // Get a batch of work item links
+ GetReportingLinksByLinkType(context.Context, GetReportingLinksByLinkTypeArgs) (*ReportingWorkItemLinksBatch, error)
+ // Returns a fully hydrated work item for the requested revision
+ GetRevision(context.Context, GetRevisionArgs) (*WorkItem, error)
+ // Returns the list of fully hydrated work item revisions, paged.
+ GetRevisions(context.Context, GetRevisionsArgs) (*[]WorkItem, error)
+ // Gets root classification nodes under the project.
+ GetRootNodes(context.Context, GetRootNodesArgs) (*[]WorkItemClassificationNode, error)
+ // [Preview API]
+ GetTag(context.Context, GetTagArgs) (*WorkItemTagDefinition, error)
+ // [Preview API]
+ GetTags(context.Context, GetTagsArgs) (*[]WorkItemTagDefinition, error)
+ // [Preview API] Gets the template with specified id
+ GetTemplate(context.Context, GetTemplateArgs) (*WorkItemTemplate, error)
+ // [Preview API] Gets template
+ GetTemplates(context.Context, GetTemplatesArgs) (*[]WorkItemTemplateReference, error)
+ // Returns a single update for a work item
+ GetUpdate(context.Context, GetUpdateArgs) (*WorkItemUpdate, error)
+ // Returns a the deltas between work item revisions
+ GetUpdates(context.Context, GetUpdatesArgs) (*[]WorkItemUpdate, error)
+ // [Preview API] Get the list of work item tracking outbound artifact link types.
+ GetWorkArtifactLinkTypes(context.Context, GetWorkArtifactLinkTypesArgs) (*[]WorkArtifactLink, error)
+ // Returns a single work item.
+ GetWorkItem(context.Context, GetWorkItemArgs) (*WorkItem, error)
+ // Get a work item icon given the friendly name and icon color.
+ GetWorkItemIconJson(context.Context, GetWorkItemIconJsonArgs) (*WorkItemIcon, error)
+ // Get a list of all work item icons.
+ GetWorkItemIcons(context.Context, GetWorkItemIconsArgs) (*[]WorkItemIcon, error)
+ // Get a work item icon given the friendly name and icon color.
+ GetWorkItemIconSvg(context.Context, GetWorkItemIconSvgArgs) (io.ReadCloser, error)
+ // Get a work item icon given the friendly name and icon color.
+ GetWorkItemIconXaml(context.Context, GetWorkItemIconXamlArgs) (io.ReadCloser, error)
+ // [Preview API] Returns the next state on the given work item IDs.
+ GetWorkItemNextStatesOnCheckinAction(context.Context, GetWorkItemNextStatesOnCheckinActionArgs) (*[]WorkItemNextStateOnTransition, error)
+ // Returns a list of work items (Maximum 200)
+ GetWorkItems(context.Context, GetWorkItemsArgs) (*[]WorkItem, error)
+ // Gets work items for a list of work item ids (Maximum 200)
+ GetWorkItemsBatch(context.Context, GetWorkItemsBatchArgs) (*[]WorkItem, error)
+ // Returns a single work item from a template.
+ GetWorkItemTemplate(context.Context, GetWorkItemTemplateArgs) (*WorkItem, error)
+ // Returns a work item type definition.
+ GetWorkItemType(context.Context, GetWorkItemTypeArgs) (*WorkItemType, error)
+ // Get all work item type categories.
+ GetWorkItemTypeCategories(context.Context, GetWorkItemTypeCategoriesArgs) (*[]WorkItemTypeCategory, error)
+ // Get specific work item type category by name.
+ GetWorkItemTypeCategory(context.Context, GetWorkItemTypeCategoryArgs) (*WorkItemTypeCategory, error)
+ // Get a list of fields for a work item type with detailed references.
+ GetWorkItemTypeFieldsWithReferences(context.Context, GetWorkItemTypeFieldsWithReferencesArgs) (*[]WorkItemTypeFieldWithReferences, error)
+ // Get a field for a work item type with detailed references.
+ GetWorkItemTypeFieldWithReferences(context.Context, GetWorkItemTypeFieldWithReferencesArgs) (*WorkItemTypeFieldWithReferences, error)
+ // Returns the list of work item types
+ GetWorkItemTypes(context.Context, GetWorkItemTypesArgs) (*[]WorkItemType, error)
+ // [Preview API] Returns the state names and colors for a work item type.
+ GetWorkItemTypeStates(context.Context, GetWorkItemTypeStatesArgs) (*[]WorkItemStateColor, error)
+ // [Preview API] Migrates a project to a different process within the same OOB type. For example, you can only migrate a project from agile/custom-agile to agile/custom-agile.
+ MigrateProjectsProcess(context.Context, MigrateProjectsProcessArgs) (*ProcessMigrationResultModel, error)
+ // Gets the results of the query given the query ID.
+ QueryById(context.Context, QueryByIdArgs) (*WorkItemQueryResult, error)
+ // Gets the results of the query given its WIQL.
+ QueryByWiql(context.Context, QueryByWiqlArgs) (*WorkItemQueryResult, error)
+ // [Preview API] Queries work items linked to a given list of artifact URI.
+ QueryWorkItemsForArtifactUris(context.Context, QueryWorkItemsForArtifactUrisArgs) (*ArtifactUriQueryResult, error)
+ // [Preview API]
+ ReadReportingDiscussions(context.Context, ReadReportingDiscussionsArgs) (*ReportingWorkItemRevisionsBatch, error)
+ // Get a batch of work item revisions with the option of including deleted items
+ ReadReportingRevisionsGet(context.Context, ReadReportingRevisionsGetArgs) (*ReportingWorkItemRevisionsBatch, error)
+ // Get a batch of work item revisions. This request may be used if your list of fields is large enough that it may run the URL over the length limit.
+ ReadReportingRevisionsPost(context.Context, ReadReportingRevisionsPostArgs) (*ReportingWorkItemRevisionsBatch, error)
+ // [Preview API] Replace template contents
+ ReplaceTemplate(context.Context, ReplaceTemplateArgs) (*WorkItemTemplate, error)
+ // Restores the deleted work item from Recycle Bin.
+ RestoreWorkItem(context.Context, RestoreWorkItemArgs) (*WorkItemDelete, error)
+ // Searches all queries the user has access to in the current project
+ SearchQueries(context.Context, SearchQueriesArgs) (*QueryHierarchyItemsResult, error)
+ // Update an existing classification node.
+ UpdateClassificationNode(context.Context, UpdateClassificationNodeArgs) (*WorkItemClassificationNode, error)
+ // [Preview API] Update a comment on a work item.
+ UpdateComment(context.Context, UpdateCommentArgs) (*Comment, error)
+ // Update a field.
+ UpdateField(context.Context, UpdateFieldArgs) (*WorkItemField, error)
+ // Update a query or a folder. This allows you to update, rename and move queries and folders.
+ UpdateQuery(context.Context, UpdateQueryArgs) (*QueryHierarchyItem, error)
+ // [Preview API]
+ UpdateTag(context.Context, UpdateTagArgs) (*WorkItemTagDefinition, error)
+ // Updates a single work item.
+ UpdateWorkItem(context.Context, UpdateWorkItemArgs) (*WorkItem, error)
+}
+
+type ClientImpl struct {
+ Client azuredevops.Client
+}
+
+func NewClient(ctx context.Context, connection *azuredevops.Connection) (Client, error) {
+ client, err := connection.GetClientByResourceAreaId(ctx, ResourceAreaId)
+ if err != nil {
+ return nil, err
+ }
+ return &ClientImpl{
+ Client: *client,
+ }, nil
+}
+
+// [Preview API] Add a comment on a work item.
+func (client *ClientImpl) AddComment(ctx context.Context, args AddCommentArgs) (*Comment, error) {
+ if args.Request == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.Request"}
+ }
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.WorkItemId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.WorkItemId"}
+ }
+ routeValues["workItemId"] = strconv.Itoa(*args.WorkItemId)
+
+ body, marshalErr := json.Marshal(*args.Request)
+ if marshalErr != nil {
+ return nil, marshalErr
+ }
+ locationId, _ := uuid.Parse("608aac0a-32e1-4493-a863-b9cf4566d257")
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.3", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue Comment
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the AddComment function
+type AddCommentArgs struct {
+ // (required) Comment create request.
+ Request *CommentCreate
+ // (required) Project ID or project name
+ Project *string
+ // (required) Id of a work item.
+ WorkItemId *int
+}
+
+// Uploads an attachment.
+func (client *ClientImpl) CreateAttachment(ctx context.Context, args CreateAttachmentArgs) (*AttachmentReference, error) {
+ if args.UploadStream == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.UploadStream"}
+ }
+ routeValues := make(map[string]string)
+ if args.Project != nil && *args.Project != "" {
+ routeValues["project"] = *args.Project
+ }
+
+ queryParams := url.Values{}
+ if args.FileName != nil {
+ queryParams.Add("fileName", *args.FileName)
+ }
+ if args.UploadType != nil {
+ queryParams.Add("uploadType", *args.UploadType)
+ }
+ if args.AreaPath != nil {
+ queryParams.Add("areaPath", *args.AreaPath)
+ }
+ locationId, _ := uuid.Parse("e07b5fa4-1499-494d-a496-64b860fd64ff")
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0", routeValues, queryParams, args.UploadStream, "application/octet-stream", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue AttachmentReference
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the CreateAttachment function
+type CreateAttachmentArgs struct {
+ // (required) Stream to upload
+ UploadStream io.Reader
+ // (optional) Project ID or project name
+ Project *string
+ // (optional) The name of the file
+ FileName *string
+ // (optional) Attachment upload type: Simple or Chunked
+ UploadType *string
+ // (optional) Target project Area Path
+ AreaPath *string
+}
+
+// [Preview API] Adds a new reaction to a comment.
+func (client *ClientImpl) CreateCommentReaction(ctx context.Context, args CreateCommentReactionArgs) (*CommentReaction, error) {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.WorkItemId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.WorkItemId"}
+ }
+ routeValues["workItemId"] = strconv.Itoa(*args.WorkItemId)
+ if args.CommentId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.CommentId"}
+ }
+ routeValues["commentId"] = strconv.Itoa(*args.CommentId)
+ if args.ReactionType == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.ReactionType"}
+ }
+ routeValues["reactionType"] = string(*args.ReactionType)
+
+ locationId, _ := uuid.Parse("f6cb3f27-1028-4851-af96-887e570dc21f")
+ resp, err := client.Client.Send(ctx, http.MethodPut, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue CommentReaction
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the CreateCommentReaction function
+type CreateCommentReactionArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (required) WorkItem ID
+ WorkItemId *int
+ // (required) Comment ID
+ CommentId *int
+ // (required) Type of the reaction
+ ReactionType *CommentReactionType
+}
+
+// Create a new field.
+func (client *ClientImpl) CreateField(ctx context.Context, args CreateFieldArgs) (*WorkItemField, error) {
+ if args.WorkItemField == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.WorkItemField"}
+ }
+ routeValues := make(map[string]string)
+ if args.Project != nil && *args.Project != "" {
+ routeValues["project"] = *args.Project
+ }
+
+ body, marshalErr := json.Marshal(*args.WorkItemField)
+ if marshalErr != nil {
+ return nil, marshalErr
+ }
+ locationId, _ := uuid.Parse("b51fd764-e5c2-4b9b-aaf7-3395cf4bdd94")
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue WorkItemField
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the CreateField function
+type CreateFieldArgs struct {
+ // (required) New field definition
+ WorkItemField *WorkItemField
+ // (optional) Project ID or project name
+ Project *string
+}
+
+// Create new or update an existing classification node.
+func (client *ClientImpl) CreateOrUpdateClassificationNode(ctx context.Context, args CreateOrUpdateClassificationNodeArgs) (*WorkItemClassificationNode, error) {
+ if args.PostedNode == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.PostedNode"}
+ }
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.StructureGroup == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.StructureGroup"}
+ }
+ routeValues["structureGroup"] = string(*args.StructureGroup)
+ if args.Path != nil && *args.Path != "" {
+ routeValues["path"] = *args.Path
+ }
+
+ body, marshalErr := json.Marshal(*args.PostedNode)
+ if marshalErr != nil {
+ return nil, marshalErr
+ }
+ locationId, _ := uuid.Parse("5a172953-1b41-49d3-840a-33f79c3ce89f")
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue WorkItemClassificationNode
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the CreateOrUpdateClassificationNode function
+type CreateOrUpdateClassificationNodeArgs struct {
+ // (required) Node to create or update.
+ PostedNode *WorkItemClassificationNode
+ // (required) Project ID or project name
+ Project *string
+ // (required) Structure group of the classification node, area or iteration.
+ StructureGroup *TreeStructureGroup
+ // (optional) Path of the classification node.
+ Path *string
+}
+
+// Creates a query, or moves a query.
+func (client *ClientImpl) CreateQuery(ctx context.Context, args CreateQueryArgs) (*QueryHierarchyItem, error) {
+ if args.PostedQuery == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.PostedQuery"}
+ }
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.Query == nil || *args.Query == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Query"}
+ }
+ routeValues["query"] = *args.Query
+
+ queryParams := url.Values{}
+ if args.ValidateWiqlOnly != nil {
+ queryParams.Add("validateWiqlOnly", strconv.FormatBool(*args.ValidateWiqlOnly))
+ }
+ body, marshalErr := json.Marshal(*args.PostedQuery)
+ if marshalErr != nil {
+ return nil, marshalErr
+ }
+ locationId, _ := uuid.Parse("a67d190c-c41f-424b-814d-0e906f659301")
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue QueryHierarchyItem
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the CreateQuery function
+type CreateQueryArgs struct {
+ // (required) The query to create.
+ PostedQuery *QueryHierarchyItem
+ // (required) Project ID or project name
+ Project *string
+ // (required) The parent id or path under which the query is to be created.
+ Query *string
+ // (optional) If you only want to validate your WIQL query without actually creating one, set it to true. Default is false.
+ ValidateWiqlOnly *bool
+}
+
+// [Preview API] Creates a template
+func (client *ClientImpl) CreateTemplate(ctx context.Context, args CreateTemplateArgs) (*WorkItemTemplate, error) {
+ if args.Template == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.Template"}
+ }
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.Team == nil || *args.Team == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Team"}
+ }
+ routeValues["team"] = *args.Team
+
+ body, marshalErr := json.Marshal(*args.Template)
+ if marshalErr != nil {
+ return nil, marshalErr
+ }
+ locationId, _ := uuid.Parse("6a90345f-a676-4969-afce-8e163e1d5642")
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue WorkItemTemplate
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the CreateTemplate function
+type CreateTemplateArgs struct {
+ // (required) Template contents
+ Template *WorkItemTemplate
+ // (required) Project ID or project name
+ Project *string
+ // (required) Team ID or team name
+ Team *string
+}
+
+// Creates a single work item.
+func (client *ClientImpl) CreateWorkItem(ctx context.Context, args CreateWorkItemArgs) (*WorkItem, error) {
+ if args.Document == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.Document"}
+ }
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.Type == nil || *args.Type == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Type"}
+ }
+ routeValues["type"] = *args.Type
+
+ queryParams := url.Values{}
+ if args.ValidateOnly != nil {
+ queryParams.Add("validateOnly", strconv.FormatBool(*args.ValidateOnly))
+ }
+ if args.BypassRules != nil {
+ queryParams.Add("bypassRules", strconv.FormatBool(*args.BypassRules))
+ }
+ if args.SuppressNotifications != nil {
+ queryParams.Add("suppressNotifications", strconv.FormatBool(*args.SuppressNotifications))
+ }
+ if args.Expand != nil {
+ queryParams.Add("$expand", string(*args.Expand))
+ }
+ body, marshalErr := json.Marshal(*args.Document)
+ if marshalErr != nil {
+ return nil, marshalErr
+ }
+ locationId, _ := uuid.Parse("62d3d110-0047-428c-ad3c-4fe872c91c74")
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0", routeValues, queryParams, bytes.NewReader(body), "application/json-patch+json", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue WorkItem
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the CreateWorkItem function
+type CreateWorkItemArgs struct {
+ // (required) The JSON Patch document representing the work item
+ Document *[]webapi.JsonPatchOperation
+ // (required) Project ID or project name
+ Project *string
+ // (required) The work item type of the work item to create
+ Type *string
+ // (optional) Indicate if you only want to validate the changes without saving the work item
+ ValidateOnly *bool
+ // (optional) Do not enforce the work item type rules on this update
+ BypassRules *bool
+ // (optional) Do not fire any notifications for this change
+ SuppressNotifications *bool
+ // (optional) The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }.
+ Expand *WorkItemExpand
+}
+
+// Delete an existing classification node.
+func (client *ClientImpl) DeleteClassificationNode(ctx context.Context, args DeleteClassificationNodeArgs) error {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.StructureGroup == nil {
+ return &azuredevops.ArgumentNilError{ArgumentName: "args.StructureGroup"}
+ }
+ routeValues["structureGroup"] = string(*args.StructureGroup)
+ if args.Path != nil && *args.Path != "" {
+ routeValues["path"] = *args.Path
+ }
+
+ queryParams := url.Values{}
+ if args.ReclassifyId != nil {
+ queryParams.Add("$reclassifyId", strconv.Itoa(*args.ReclassifyId))
+ }
+ locationId, _ := uuid.Parse("5a172953-1b41-49d3-840a-33f79c3ce89f")
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// Arguments for the DeleteClassificationNode function
+type DeleteClassificationNodeArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (required) Structure group of the classification node, area or iteration.
+ StructureGroup *TreeStructureGroup
+ // (optional) Path of the classification node.
+ Path *string
+ // (optional) Id of the target classification node for reclassification.
+ ReclassifyId *int
+}
+
+// [Preview API] Delete a comment on a work item.
+func (client *ClientImpl) DeleteComment(ctx context.Context, args DeleteCommentArgs) error {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.WorkItemId == nil {
+ return &azuredevops.ArgumentNilError{ArgumentName: "args.WorkItemId"}
+ }
+ routeValues["workItemId"] = strconv.Itoa(*args.WorkItemId)
+ if args.CommentId == nil {
+ return &azuredevops.ArgumentNilError{ArgumentName: "args.CommentId"}
+ }
+ routeValues["commentId"] = strconv.Itoa(*args.CommentId)
+
+ locationId, _ := uuid.Parse("608aac0a-32e1-4493-a863-b9cf4566d257")
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0-preview.3", routeValues, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// Arguments for the DeleteComment function
+type DeleteCommentArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (required) Id of a work item.
+ WorkItemId *int
+ // (required)
+ CommentId *int
+}
+
+// [Preview API] Deletes an existing reaction on a comment.
+func (client *ClientImpl) DeleteCommentReaction(ctx context.Context, args DeleteCommentReactionArgs) (*CommentReaction, error) {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.WorkItemId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.WorkItemId"}
+ }
+ routeValues["workItemId"] = strconv.Itoa(*args.WorkItemId)
+ if args.CommentId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.CommentId"}
+ }
+ routeValues["commentId"] = strconv.Itoa(*args.CommentId)
+ if args.ReactionType == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.ReactionType"}
+ }
+ routeValues["reactionType"] = string(*args.ReactionType)
+
+ locationId, _ := uuid.Parse("f6cb3f27-1028-4851-af96-887e570dc21f")
+ resp, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue CommentReaction
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the DeleteCommentReaction function
+type DeleteCommentReactionArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (required) WorkItem ID
+ WorkItemId *int
+ // (required) Comment ID
+ CommentId *int
+ // (required) Type of the reaction
+ ReactionType *CommentReactionType
+}
+
+// Deletes the field. To undelete a filed, see "Update Field" API.
+func (client *ClientImpl) DeleteField(ctx context.Context, args DeleteFieldArgs) error {
+ routeValues := make(map[string]string)
+ if args.Project != nil && *args.Project != "" {
+ routeValues["project"] = *args.Project
+ }
+ if args.FieldNameOrRefName == nil || *args.FieldNameOrRefName == "" {
+ return &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.FieldNameOrRefName"}
+ }
+ routeValues["fieldNameOrRefName"] = *args.FieldNameOrRefName
+
+ locationId, _ := uuid.Parse("b51fd764-e5c2-4b9b-aaf7-3395cf4bdd94")
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// Arguments for the DeleteField function
+type DeleteFieldArgs struct {
+ // (required) Field simple name or reference name
+ FieldNameOrRefName *string
+ // (optional) Project ID or project name
+ Project *string
+}
+
+// Delete a query or a folder. This deletes any permission change on the deleted query or folder and any of its descendants if it is a folder. It is important to note that the deleted permission changes cannot be recovered upon undeleting the query or folder.
+func (client *ClientImpl) DeleteQuery(ctx context.Context, args DeleteQueryArgs) error {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.Query == nil || *args.Query == "" {
+ return &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Query"}
+ }
+ routeValues["query"] = *args.Query
+
+ locationId, _ := uuid.Parse("a67d190c-c41f-424b-814d-0e906f659301")
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// Arguments for the DeleteQuery function
+type DeleteQueryArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (required) ID or path of the query or folder to delete.
+ Query *string
+}
+
+// [Preview API]
+func (client *ClientImpl) DeleteTag(ctx context.Context, args DeleteTagArgs) error {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.TagIdOrName == nil || *args.TagIdOrName == "" {
+ return &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.TagIdOrName"}
+ }
+ routeValues["tagIdOrName"] = *args.TagIdOrName
+
+ locationId, _ := uuid.Parse("bc15bc60-e7a8-43cb-ab01-2106be3983a1")
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// Arguments for the DeleteTag function
+type DeleteTagArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (required)
+ TagIdOrName *string
+}
+
+// [Preview API] Deletes the template with given id
+func (client *ClientImpl) DeleteTemplate(ctx context.Context, args DeleteTemplateArgs) error {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.Team == nil || *args.Team == "" {
+ return &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Team"}
+ }
+ routeValues["team"] = *args.Team
+ if args.TemplateId == nil {
+ return &azuredevops.ArgumentNilError{ArgumentName: "args.TemplateId"}
+ }
+ routeValues["templateId"] = (*args.TemplateId).String()
+
+ locationId, _ := uuid.Parse("fb10264a-8836-48a0-8033-1b0ccd2748d5")
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// Arguments for the DeleteTemplate function
+type DeleteTemplateArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (required) Team ID or team name
+ Team *string
+ // (required) Template id
+ TemplateId *uuid.UUID
+}
+
+// Deletes the specified work item and sends it to the Recycle Bin, so that it can be restored back, if required. Optionally, if the destroy parameter has been set to true, it destroys the work item permanently. WARNING: If the destroy parameter is set to true, work items deleted by this command will NOT go to recycle-bin and there is no way to restore/recover them after deletion. It is recommended NOT to use this parameter. If you do, please use this parameter with extreme caution.
+func (client *ClientImpl) DeleteWorkItem(ctx context.Context, args DeleteWorkItemArgs) (*WorkItemDelete, error) {
+ routeValues := make(map[string]string)
+ if args.Project != nil && *args.Project != "" {
+ routeValues["project"] = *args.Project
+ }
+ if args.Id == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.Id"}
+ }
+ routeValues["id"] = strconv.Itoa(*args.Id)
+
+ queryParams := url.Values{}
+ if args.Destroy != nil {
+ queryParams.Add("destroy", strconv.FormatBool(*args.Destroy))
+ }
+ locationId, _ := uuid.Parse("72c7ddf8-2cdc-4f60-90cd-ab71c14a399b")
+ resp, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue WorkItemDelete
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the DeleteWorkItem function
+type DeleteWorkItemArgs struct {
+ // (required) ID of the work item to be deleted
+ Id *int
+ // (optional) Project ID or project name
+ Project *string
+ // (optional) Optional parameter, if set to true, the work item is deleted permanently. Please note: the destroy action is PERMANENT and cannot be undone.
+ Destroy *bool
+}
+
+// Destroys the specified work item permanently from the Recycle Bin. This action can not be undone.
+func (client *ClientImpl) DestroyWorkItem(ctx context.Context, args DestroyWorkItemArgs) error {
+ routeValues := make(map[string]string)
+ if args.Project != nil && *args.Project != "" {
+ routeValues["project"] = *args.Project
+ }
+ if args.Id == nil {
+ return &azuredevops.ArgumentNilError{ArgumentName: "args.Id"}
+ }
+ routeValues["id"] = strconv.Itoa(*args.Id)
+
+ locationId, _ := uuid.Parse("b70d8d39-926c-465e-b927-b1bf0e5ca0e0")
+ _, err := client.Client.Send(ctx, http.MethodDelete, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// Arguments for the DestroyWorkItem function
+type DestroyWorkItemArgs struct {
+ // (required) ID of the work item to be destroyed permanently
+ Id *int
+ // (optional) Project ID or project name
+ Project *string
+}
+
+// Downloads an attachment.
+func (client *ClientImpl) GetAttachmentContent(ctx context.Context, args GetAttachmentContentArgs) (io.ReadCloser, error) {
+ routeValues := make(map[string]string)
+ if args.Project != nil && *args.Project != "" {
+ routeValues["project"] = *args.Project
+ }
+ if args.Id == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.Id"}
+ }
+ routeValues["id"] = (*args.Id).String()
+
+ queryParams := url.Values{}
+ if args.FileName != nil {
+ queryParams.Add("fileName", *args.FileName)
+ }
+ if args.Download != nil {
+ queryParams.Add("download", strconv.FormatBool(*args.Download))
+ }
+ locationId, _ := uuid.Parse("e07b5fa4-1499-494d-a496-64b860fd64ff")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/octet-stream", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ return resp.Body, err
+}
+
+// Arguments for the GetAttachmentContent function
+type GetAttachmentContentArgs struct {
+ // (required) Attachment ID
+ Id *uuid.UUID
+ // (optional) Project ID or project name
+ Project *string
+ // (optional) Name of the file
+ FileName *string
+ // (optional) If set to true always download attachment
+ Download *bool
+}
+
+// Downloads an attachment.
+func (client *ClientImpl) GetAttachmentZip(ctx context.Context, args GetAttachmentZipArgs) (io.ReadCloser, error) {
+ routeValues := make(map[string]string)
+ if args.Project != nil && *args.Project != "" {
+ routeValues["project"] = *args.Project
+ }
+ if args.Id == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.Id"}
+ }
+ routeValues["id"] = (*args.Id).String()
+
+ queryParams := url.Values{}
+ if args.FileName != nil {
+ queryParams.Add("fileName", *args.FileName)
+ }
+ if args.Download != nil {
+ queryParams.Add("download", strconv.FormatBool(*args.Download))
+ }
+ locationId, _ := uuid.Parse("e07b5fa4-1499-494d-a496-64b860fd64ff")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/zip", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ return resp.Body, err
+}
+
+// Arguments for the GetAttachmentZip function
+type GetAttachmentZipArgs struct {
+ // (required) Attachment ID
+ Id *uuid.UUID
+ // (optional) Project ID or project name
+ Project *string
+ // (optional) Name of the file
+ FileName *string
+ // (optional) If set to true always download attachment
+ Download *bool
+}
+
+// Gets the classification node for a given node path.
+func (client *ClientImpl) GetClassificationNode(ctx context.Context, args GetClassificationNodeArgs) (*WorkItemClassificationNode, error) {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.StructureGroup == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.StructureGroup"}
+ }
+ routeValues["structureGroup"] = string(*args.StructureGroup)
+ if args.Path != nil && *args.Path != "" {
+ routeValues["path"] = *args.Path
+ }
+
+ queryParams := url.Values{}
+ if args.Depth != nil {
+ queryParams.Add("$depth", strconv.Itoa(*args.Depth))
+ }
+ locationId, _ := uuid.Parse("5a172953-1b41-49d3-840a-33f79c3ce89f")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue WorkItemClassificationNode
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetClassificationNode function
+type GetClassificationNodeArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (required) Structure group of the classification node, area or iteration.
+ StructureGroup *TreeStructureGroup
+ // (optional) Path of the classification node.
+ Path *string
+ // (optional) Depth of children to fetch.
+ Depth *int
+}
+
+// Gets root classification nodes or list of classification nodes for a given list of nodes ids, for a given project. In case ids parameter is supplied you will get list of classification nodes for those ids. Otherwise you will get root classification nodes for this project.
+func (client *ClientImpl) GetClassificationNodes(ctx context.Context, args GetClassificationNodesArgs) (*[]WorkItemClassificationNode, error) {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+
+ queryParams := url.Values{}
+ if args.Ids == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "ids"}
+ }
+ var stringList []string
+ for _, item := range *args.Ids {
+ stringList = append(stringList, strconv.Itoa(item))
+ }
+ listAsString := strings.Join((stringList)[:], ",")
+ queryParams.Add("ids", listAsString)
+ if args.Depth != nil {
+ queryParams.Add("$depth", strconv.Itoa(*args.Depth))
+ }
+ if args.ErrorPolicy != nil {
+ queryParams.Add("errorPolicy", string(*args.ErrorPolicy))
+ }
+ locationId, _ := uuid.Parse("a70579d1-f53a-48ee-a5be-7be8659023b9")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []WorkItemClassificationNode
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetClassificationNodes function
+type GetClassificationNodesArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (required) Comma separated integer classification nodes ids. It's not required, if you want root nodes.
+ Ids *[]int
+ // (optional) Depth of children to fetch.
+ Depth *int
+ // (optional) Flag to handle errors in getting some nodes. Possible options are Fail and Omit.
+ ErrorPolicy *ClassificationNodesErrorPolicy
+}
+
+// [Preview API] Returns a work item comment.
+func (client *ClientImpl) GetComment(ctx context.Context, args GetCommentArgs) (*Comment, error) {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.WorkItemId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.WorkItemId"}
+ }
+ routeValues["workItemId"] = strconv.Itoa(*args.WorkItemId)
+ if args.CommentId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.CommentId"}
+ }
+ routeValues["commentId"] = strconv.Itoa(*args.CommentId)
+
+ queryParams := url.Values{}
+ if args.IncludeDeleted != nil {
+ queryParams.Add("includeDeleted", strconv.FormatBool(*args.IncludeDeleted))
+ }
+ if args.Expand != nil {
+ queryParams.Add("$expand", string(*args.Expand))
+ }
+ locationId, _ := uuid.Parse("608aac0a-32e1-4493-a863-b9cf4566d257")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.3", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue Comment
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetComment function
+type GetCommentArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (required) Id of a work item to get the comment.
+ WorkItemId *int
+ // (required) Id of the comment to return.
+ CommentId *int
+ // (optional) Specify if the deleted comment should be retrieved.
+ IncludeDeleted *bool
+ // (optional) Specifies the additional data retrieval options for work item comments.
+ Expand *CommentExpandOptions
+}
+
+// [Preview API] Gets reactions of a comment.
+func (client *ClientImpl) GetCommentReactions(ctx context.Context, args GetCommentReactionsArgs) (*[]CommentReaction, error) {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.WorkItemId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.WorkItemId"}
+ }
+ routeValues["workItemId"] = strconv.Itoa(*args.WorkItemId)
+ if args.CommentId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.CommentId"}
+ }
+ routeValues["commentId"] = strconv.Itoa(*args.CommentId)
+
+ locationId, _ := uuid.Parse("f6cb3f27-1028-4851-af96-887e570dc21f")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []CommentReaction
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetCommentReactions function
+type GetCommentReactionsArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (required) WorkItem ID
+ WorkItemId *int
+ // (required) Comment ID
+ CommentId *int
+}
+
+// [Preview API] Returns a list of work item comments, pageable.
+func (client *ClientImpl) GetComments(ctx context.Context, args GetCommentsArgs) (*CommentList, error) {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.WorkItemId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.WorkItemId"}
+ }
+ routeValues["workItemId"] = strconv.Itoa(*args.WorkItemId)
+
+ queryParams := url.Values{}
+ if args.Top != nil {
+ queryParams.Add("$top", strconv.Itoa(*args.Top))
+ }
+ if args.ContinuationToken != nil {
+ queryParams.Add("continuationToken", *args.ContinuationToken)
+ }
+ if args.IncludeDeleted != nil {
+ queryParams.Add("includeDeleted", strconv.FormatBool(*args.IncludeDeleted))
+ }
+ if args.Expand != nil {
+ queryParams.Add("$expand", string(*args.Expand))
+ }
+ if args.Order != nil {
+ queryParams.Add("order", string(*args.Order))
+ }
+ locationId, _ := uuid.Parse("608aac0a-32e1-4493-a863-b9cf4566d257")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.3", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue CommentList
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetComments function
+type GetCommentsArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (required) Id of a work item to get comments for.
+ WorkItemId *int
+ // (optional) Max number of comments to return.
+ Top *int
+ // (optional) Used to query for the next page of comments.
+ ContinuationToken *string
+ // (optional) Specify if the deleted comments should be retrieved.
+ IncludeDeleted *bool
+ // (optional) Specifies the additional data retrieval options for work item comments.
+ Expand *CommentExpandOptions
+ // (optional) Order in which the comments should be returned.
+ Order *CommentSortOrder
+}
+
+// [Preview API] Returns a list of work item comments by ids.
+func (client *ClientImpl) GetCommentsBatch(ctx context.Context, args GetCommentsBatchArgs) (*CommentList, error) {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.WorkItemId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.WorkItemId"}
+ }
+ routeValues["workItemId"] = strconv.Itoa(*args.WorkItemId)
+
+ queryParams := url.Values{}
+ if args.Ids == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "ids"}
+ }
+ var stringList []string
+ for _, item := range *args.Ids {
+ stringList = append(stringList, strconv.Itoa(item))
+ }
+ listAsString := strings.Join((stringList)[:], ",")
+ queryParams.Add("ids", listAsString)
+ if args.IncludeDeleted != nil {
+ queryParams.Add("includeDeleted", strconv.FormatBool(*args.IncludeDeleted))
+ }
+ if args.Expand != nil {
+ queryParams.Add("$expand", string(*args.Expand))
+ }
+ locationId, _ := uuid.Parse("608aac0a-32e1-4493-a863-b9cf4566d257")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.3", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue CommentList
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetCommentsBatch function
+type GetCommentsBatchArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (required) Id of a work item to get comments for.
+ WorkItemId *int
+ // (required) Comma-separated list of comment ids to return.
+ Ids *[]int
+ // (optional) Specify if the deleted comments should be retrieved.
+ IncludeDeleted *bool
+ // (optional) Specifies the additional data retrieval options for work item comments.
+ Expand *CommentExpandOptions
+}
+
+// [Preview API]
+func (client *ClientImpl) GetCommentVersion(ctx context.Context, args GetCommentVersionArgs) (*CommentVersion, error) {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.WorkItemId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.WorkItemId"}
+ }
+ routeValues["workItemId"] = strconv.Itoa(*args.WorkItemId)
+ if args.CommentId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.CommentId"}
+ }
+ routeValues["commentId"] = strconv.Itoa(*args.CommentId)
+ if args.Version == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.Version"}
+ }
+ routeValues["version"] = strconv.Itoa(*args.Version)
+
+ locationId, _ := uuid.Parse("49e03b34-3be0-42e3-8a5d-e8dfb88ac954")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue CommentVersion
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetCommentVersion function
+type GetCommentVersionArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (required)
+ WorkItemId *int
+ // (required)
+ CommentId *int
+ // (required)
+ Version *int
+}
+
+// [Preview API]
+func (client *ClientImpl) GetCommentVersions(ctx context.Context, args GetCommentVersionsArgs) (*[]CommentVersion, error) {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.WorkItemId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.WorkItemId"}
+ }
+ routeValues["workItemId"] = strconv.Itoa(*args.WorkItemId)
+ if args.CommentId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.CommentId"}
+ }
+ routeValues["commentId"] = strconv.Itoa(*args.CommentId)
+
+ locationId, _ := uuid.Parse("49e03b34-3be0-42e3-8a5d-e8dfb88ac954")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []CommentVersion
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetCommentVersions function
+type GetCommentVersionsArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (required)
+ WorkItemId *int
+ // (required)
+ CommentId *int
+}
+
+// Gets a deleted work item from Recycle Bin.
+func (client *ClientImpl) GetDeletedWorkItem(ctx context.Context, args GetDeletedWorkItemArgs) (*WorkItemDelete, error) {
+ routeValues := make(map[string]string)
+ if args.Project != nil && *args.Project != "" {
+ routeValues["project"] = *args.Project
+ }
+ if args.Id == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.Id"}
+ }
+ routeValues["id"] = strconv.Itoa(*args.Id)
+
+ locationId, _ := uuid.Parse("b70d8d39-926c-465e-b927-b1bf0e5ca0e0")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue WorkItemDelete
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetDeletedWorkItem function
+type GetDeletedWorkItemArgs struct {
+ // (required) ID of the work item to be returned
+ Id *int
+ // (optional) Project ID or project name
+ Project *string
+}
+
+// Gets the work items from the recycle bin, whose IDs have been specified in the parameters
+func (client *ClientImpl) GetDeletedWorkItems(ctx context.Context, args GetDeletedWorkItemsArgs) (*[]WorkItemDeleteReference, error) {
+ routeValues := make(map[string]string)
+ if args.Project != nil && *args.Project != "" {
+ routeValues["project"] = *args.Project
+ }
+
+ queryParams := url.Values{}
+ if args.Ids == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "ids"}
+ }
+ var stringList []string
+ for _, item := range *args.Ids {
+ stringList = append(stringList, strconv.Itoa(item))
+ }
+ listAsString := strings.Join((stringList)[:], ",")
+ queryParams.Add("ids", listAsString)
+ locationId, _ := uuid.Parse("b70d8d39-926c-465e-b927-b1bf0e5ca0e0")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []WorkItemDeleteReference
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetDeletedWorkItems function
+type GetDeletedWorkItemsArgs struct {
+ // (required) Comma separated list of IDs of the deleted work items to be returned
+ Ids *[]int
+ // (optional) Project ID or project name
+ Project *string
+}
+
+// Gets a list of the IDs and the URLs of the deleted the work items in the Recycle Bin.
+func (client *ClientImpl) GetDeletedWorkItemShallowReferences(ctx context.Context, args GetDeletedWorkItemShallowReferencesArgs) (*[]WorkItemDeleteShallowReference, error) {
+ routeValues := make(map[string]string)
+ if args.Project != nil && *args.Project != "" {
+ routeValues["project"] = *args.Project
+ }
+
+ locationId, _ := uuid.Parse("b70d8d39-926c-465e-b927-b1bf0e5ca0e0")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []WorkItemDeleteShallowReference
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetDeletedWorkItemShallowReferences function
+type GetDeletedWorkItemShallowReferencesArgs struct {
+ // (optional) Project ID or project name
+ Project *string
+}
+
+// [Preview API] Get users who reacted on the comment.
+func (client *ClientImpl) GetEngagedUsers(ctx context.Context, args GetEngagedUsersArgs) (*[]webapi.IdentityRef, error) {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.WorkItemId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.WorkItemId"}
+ }
+ routeValues["workItemId"] = strconv.Itoa(*args.WorkItemId)
+ if args.CommentId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.CommentId"}
+ }
+ routeValues["commentId"] = strconv.Itoa(*args.CommentId)
+ if args.ReactionType == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.ReactionType"}
+ }
+ routeValues["reactionType"] = string(*args.ReactionType)
+
+ queryParams := url.Values{}
+ if args.Top != nil {
+ queryParams.Add("$top", strconv.Itoa(*args.Top))
+ }
+ if args.Skip != nil {
+ queryParams.Add("$skip", strconv.Itoa(*args.Skip))
+ }
+ locationId, _ := uuid.Parse("e33ca5e0-2349-4285-af3d-d72d86781c35")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []webapi.IdentityRef
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetEngagedUsers function
+type GetEngagedUsersArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (required) WorkItem ID.
+ WorkItemId *int
+ // (required) Comment ID.
+ CommentId *int
+ // (required) Type of the reaction.
+ ReactionType *CommentReactionType
+ // (optional)
+ Top *int
+ // (optional)
+ Skip *int
+}
+
+// Gets information on a specific field.
+func (client *ClientImpl) GetField(ctx context.Context, args GetFieldArgs) (*WorkItemField, error) {
+ routeValues := make(map[string]string)
+ if args.Project != nil && *args.Project != "" {
+ routeValues["project"] = *args.Project
+ }
+ if args.FieldNameOrRefName == nil || *args.FieldNameOrRefName == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.FieldNameOrRefName"}
+ }
+ routeValues["fieldNameOrRefName"] = *args.FieldNameOrRefName
+
+ locationId, _ := uuid.Parse("b51fd764-e5c2-4b9b-aaf7-3395cf4bdd94")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue WorkItemField
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetField function
+type GetFieldArgs struct {
+ // (required) Field simple name or reference name
+ FieldNameOrRefName *string
+ // (optional) Project ID or project name
+ Project *string
+}
+
+// Returns information for all fields. The project ID/name parameter is optional.
+func (client *ClientImpl) GetFields(ctx context.Context, args GetFieldsArgs) (*[]WorkItemField, error) {
+ routeValues := make(map[string]string)
+ if args.Project != nil && *args.Project != "" {
+ routeValues["project"] = *args.Project
+ }
+
+ queryParams := url.Values{}
+ if args.Expand != nil {
+ queryParams.Add("$expand", string(*args.Expand))
+ }
+ locationId, _ := uuid.Parse("b51fd764-e5c2-4b9b-aaf7-3395cf4bdd94")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []WorkItemField
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetFields function
+type GetFieldsArgs struct {
+ // (optional) Project ID or project name
+ Project *string
+ // (optional) Use ExtensionFields to include extension fields, otherwise exclude them. Unless the feature flag for this parameter is enabled, extension fields are always included.
+ Expand *GetFieldsExpand
+}
+
+// Gets the root queries and their children
+func (client *ClientImpl) GetQueries(ctx context.Context, args GetQueriesArgs) (*[]QueryHierarchyItem, error) {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+
+ queryParams := url.Values{}
+ if args.Expand != nil {
+ queryParams.Add("$expand", string(*args.Expand))
+ }
+ if args.Depth != nil {
+ queryParams.Add("$depth", strconv.Itoa(*args.Depth))
+ }
+ if args.IncludeDeleted != nil {
+ queryParams.Add("$includeDeleted", strconv.FormatBool(*args.IncludeDeleted))
+ }
+ locationId, _ := uuid.Parse("a67d190c-c41f-424b-814d-0e906f659301")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []QueryHierarchyItem
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetQueries function
+type GetQueriesArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (optional) Include the query string (wiql), clauses, query result columns, and sort options in the results.
+ Expand *QueryExpand
+ // (optional) In the folder of queries, return child queries and folders to this depth.
+ Depth *int
+ // (optional) Include deleted queries and folders
+ IncludeDeleted *bool
+}
+
+// Gets a list of queries by ids (Maximum 1000)
+func (client *ClientImpl) GetQueriesBatch(ctx context.Context, args GetQueriesBatchArgs) (*[]QueryHierarchyItem, error) {
+ if args.QueryGetRequest == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.QueryGetRequest"}
+ }
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+
+ body, marshalErr := json.Marshal(*args.QueryGetRequest)
+ if marshalErr != nil {
+ return nil, marshalErr
+ }
+ locationId, _ := uuid.Parse("549816f9-09b0-4e75-9e81-01fbfcd07426")
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []QueryHierarchyItem
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetQueriesBatch function
+type GetQueriesBatchArgs struct {
+ // (required)
+ QueryGetRequest *QueryBatchGetRequest
+ // (required) Project ID or project name
+ Project *string
+}
+
+// Retrieves an individual query and its children
+func (client *ClientImpl) GetQuery(ctx context.Context, args GetQueryArgs) (*QueryHierarchyItem, error) {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.Query == nil || *args.Query == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Query"}
+ }
+ routeValues["query"] = *args.Query
+
+ queryParams := url.Values{}
+ if args.Expand != nil {
+ queryParams.Add("$expand", string(*args.Expand))
+ }
+ if args.Depth != nil {
+ queryParams.Add("$depth", strconv.Itoa(*args.Depth))
+ }
+ if args.IncludeDeleted != nil {
+ queryParams.Add("$includeDeleted", strconv.FormatBool(*args.IncludeDeleted))
+ }
+ locationId, _ := uuid.Parse("a67d190c-c41f-424b-814d-0e906f659301")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue QueryHierarchyItem
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetQuery function
+type GetQueryArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (required) ID or path of the query.
+ Query *string
+ // (optional) Include the query string (wiql), clauses, query result columns, and sort options in the results.
+ Expand *QueryExpand
+ // (optional) In the folder of queries, return child queries and folders to this depth.
+ Depth *int
+ // (optional) Include deleted queries and folders
+ IncludeDeleted *bool
+}
+
+// Gets the results of the query given the query ID.
+func (client *ClientImpl) GetQueryResultCount(ctx context.Context, args GetQueryResultCountArgs) (*int, error) {
+ routeValues := make(map[string]string)
+ if args.Project != nil && *args.Project != "" {
+ routeValues["project"] = *args.Project
+ }
+ if args.Team != nil && *args.Team != "" {
+ routeValues["team"] = *args.Team
+ }
+ if args.Id == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.Id"}
+ }
+ routeValues["id"] = (*args.Id).String()
+
+ queryParams := url.Values{}
+ if args.TimePrecision != nil {
+ queryParams.Add("timePrecision", strconv.FormatBool(*args.TimePrecision))
+ }
+ if args.Top != nil {
+ queryParams.Add("$top", strconv.Itoa(*args.Top))
+ }
+ locationId, _ := uuid.Parse("a02355f5-5f8a-4671-8e32-369d23aac83d")
+ resp, err := client.Client.Send(ctx, http.MethodHead, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue int
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetQueryResultCount function
+type GetQueryResultCountArgs struct {
+ // (required) The query ID.
+ Id *uuid.UUID
+ // (optional) Project ID or project name
+ Project *string
+ // (optional) Team ID or team name
+ Team *string
+ // (optional) Whether or not to use time precision.
+ TimePrecision *bool
+ // (optional) The max number of results to return.
+ Top *int
+}
+
+// [Preview API] Gets recent work item activities
+func (client *ClientImpl) GetRecentActivityData(ctx context.Context, args GetRecentActivityDataArgs) (*[]AccountRecentActivityWorkItemModel2, error) {
+ locationId, _ := uuid.Parse("1bc988f4-c15f-4072-ad35-497c87e3a909")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.2", nil, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []AccountRecentActivityWorkItemModel2
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetRecentActivityData function
+type GetRecentActivityDataArgs struct {
+}
+
+// Gets the work item relation type definition.
+func (client *ClientImpl) GetRelationType(ctx context.Context, args GetRelationTypeArgs) (*WorkItemRelationType, error) {
+ routeValues := make(map[string]string)
+ if args.Relation == nil || *args.Relation == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Relation"}
+ }
+ routeValues["relation"] = *args.Relation
+
+ locationId, _ := uuid.Parse("f5d33bc9-5b49-4a3c-a9bd-f3cd46dd2165")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue WorkItemRelationType
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetRelationType function
+type GetRelationTypeArgs struct {
+ // (required) The relation name
+ Relation *string
+}
+
+// Gets the work item relation types.
+func (client *ClientImpl) GetRelationTypes(ctx context.Context, args GetRelationTypesArgs) (*[]WorkItemRelationType, error) {
+ locationId, _ := uuid.Parse("f5d33bc9-5b49-4a3c-a9bd-f3cd46dd2165")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", nil, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []WorkItemRelationType
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetRelationTypes function
+type GetRelationTypesArgs struct {
+}
+
+// Get a batch of work item links
+func (client *ClientImpl) GetReportingLinksByLinkType(ctx context.Context, args GetReportingLinksByLinkTypeArgs) (*ReportingWorkItemLinksBatch, error) {
+ routeValues := make(map[string]string)
+ if args.Project != nil && *args.Project != "" {
+ routeValues["project"] = *args.Project
+ }
+
+ queryParams := url.Values{}
+ if args.LinkTypes != nil {
+ listAsString := strings.Join((*args.LinkTypes)[:], ",")
+ queryParams.Add("linkTypes", listAsString)
+ }
+ if args.Types != nil {
+ listAsString := strings.Join((*args.Types)[:], ",")
+ queryParams.Add("types", listAsString)
+ }
+ if args.ContinuationToken != nil {
+ queryParams.Add("continuationToken", *args.ContinuationToken)
+ }
+ if args.StartDateTime != nil {
+ queryParams.Add("startDateTime", (*args.StartDateTime).AsQueryParameter())
+ }
+ locationId, _ := uuid.Parse("b5b5b6d0-0308-40a1-b3f4-b9bb3c66878f")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue ReportingWorkItemLinksBatch
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetReportingLinksByLinkType function
+type GetReportingLinksByLinkTypeArgs struct {
+ // (optional) Project ID or project name
+ Project *string
+ // (optional) A list of types to filter the results to specific link types. Omit this parameter to get work item links of all link types.
+ LinkTypes *[]string
+ // (optional) A list of types to filter the results to specific work item types. Omit this parameter to get work item links of all work item types.
+ Types *[]string
+ // (optional) Specifies the continuationToken to start the batch from. Omit this parameter to get the first batch of links.
+ ContinuationToken *string
+ // (optional) Date/time to use as a starting point for link changes. Only link changes that occurred after that date/time will be returned. Cannot be used in conjunction with 'watermark' parameter.
+ StartDateTime *azuredevops.Time
+}
+
+// Returns a fully hydrated work item for the requested revision
+func (client *ClientImpl) GetRevision(ctx context.Context, args GetRevisionArgs) (*WorkItem, error) {
+ routeValues := make(map[string]string)
+ if args.Project != nil && *args.Project != "" {
+ routeValues["project"] = *args.Project
+ }
+ if args.Id == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.Id"}
+ }
+ routeValues["id"] = strconv.Itoa(*args.Id)
+ if args.RevisionNumber == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.RevisionNumber"}
+ }
+ routeValues["revisionNumber"] = strconv.Itoa(*args.RevisionNumber)
+
+ queryParams := url.Values{}
+ if args.Expand != nil {
+ queryParams.Add("$expand", string(*args.Expand))
+ }
+ locationId, _ := uuid.Parse("a00c85a5-80fa-4565-99c3-bcd2181434bb")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue WorkItem
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetRevision function
+type GetRevisionArgs struct {
+ // (required)
+ Id *int
+ // (required)
+ RevisionNumber *int
+ // (optional) Project ID or project name
+ Project *string
+ // (optional)
+ Expand *WorkItemExpand
+}
+
+// Returns the list of fully hydrated work item revisions, paged.
+func (client *ClientImpl) GetRevisions(ctx context.Context, args GetRevisionsArgs) (*[]WorkItem, error) {
+ routeValues := make(map[string]string)
+ if args.Project != nil && *args.Project != "" {
+ routeValues["project"] = *args.Project
+ }
+ if args.Id == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.Id"}
+ }
+ routeValues["id"] = strconv.Itoa(*args.Id)
+
+ queryParams := url.Values{}
+ if args.Top != nil {
+ queryParams.Add("$top", strconv.Itoa(*args.Top))
+ }
+ if args.Skip != nil {
+ queryParams.Add("$skip", strconv.Itoa(*args.Skip))
+ }
+ if args.Expand != nil {
+ queryParams.Add("$expand", string(*args.Expand))
+ }
+ locationId, _ := uuid.Parse("a00c85a5-80fa-4565-99c3-bcd2181434bb")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []WorkItem
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetRevisions function
+type GetRevisionsArgs struct {
+ // (required)
+ Id *int
+ // (optional) Project ID or project name
+ Project *string
+ // (optional)
+ Top *int
+ // (optional)
+ Skip *int
+ // (optional)
+ Expand *WorkItemExpand
+}
+
+// Gets root classification nodes under the project.
+func (client *ClientImpl) GetRootNodes(ctx context.Context, args GetRootNodesArgs) (*[]WorkItemClassificationNode, error) {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+
+ queryParams := url.Values{}
+ if args.Depth != nil {
+ queryParams.Add("$depth", strconv.Itoa(*args.Depth))
+ }
+ locationId, _ := uuid.Parse("a70579d1-f53a-48ee-a5be-7be8659023b9")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []WorkItemClassificationNode
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetRootNodes function
+type GetRootNodesArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (optional) Depth of children to fetch.
+ Depth *int
+}
+
+// [Preview API]
+func (client *ClientImpl) GetTag(ctx context.Context, args GetTagArgs) (*WorkItemTagDefinition, error) {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.TagIdOrName == nil || *args.TagIdOrName == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.TagIdOrName"}
+ }
+ routeValues["tagIdOrName"] = *args.TagIdOrName
+
+ locationId, _ := uuid.Parse("bc15bc60-e7a8-43cb-ab01-2106be3983a1")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue WorkItemTagDefinition
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetTag function
+type GetTagArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (required)
+ TagIdOrName *string
+}
+
+// [Preview API]
+func (client *ClientImpl) GetTags(ctx context.Context, args GetTagsArgs) (*[]WorkItemTagDefinition, error) {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+
+ locationId, _ := uuid.Parse("bc15bc60-e7a8-43cb-ab01-2106be3983a1")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []WorkItemTagDefinition
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetTags function
+type GetTagsArgs struct {
+ // (required) Project ID or project name
+ Project *string
+}
+
+// [Preview API] Gets the template with specified id
+func (client *ClientImpl) GetTemplate(ctx context.Context, args GetTemplateArgs) (*WorkItemTemplate, error) {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.Team == nil || *args.Team == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Team"}
+ }
+ routeValues["team"] = *args.Team
+ if args.TemplateId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.TemplateId"}
+ }
+ routeValues["templateId"] = (*args.TemplateId).String()
+
+ locationId, _ := uuid.Parse("fb10264a-8836-48a0-8033-1b0ccd2748d5")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue WorkItemTemplate
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetTemplate function
+type GetTemplateArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (required) Team ID or team name
+ Team *string
+ // (required) Template Id
+ TemplateId *uuid.UUID
+}
+
+// [Preview API] Gets template
+func (client *ClientImpl) GetTemplates(ctx context.Context, args GetTemplatesArgs) (*[]WorkItemTemplateReference, error) {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.Team == nil || *args.Team == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Team"}
+ }
+ routeValues["team"] = *args.Team
+
+ queryParams := url.Values{}
+ if args.Workitemtypename != nil {
+ queryParams.Add("workitemtypename", *args.Workitemtypename)
+ }
+ locationId, _ := uuid.Parse("6a90345f-a676-4969-afce-8e163e1d5642")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []WorkItemTemplateReference
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetTemplates function
+type GetTemplatesArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (required) Team ID or team name
+ Team *string
+ // (optional) Optional, When specified returns templates for given Work item type.
+ Workitemtypename *string
+}
+
+// Returns a single update for a work item
+func (client *ClientImpl) GetUpdate(ctx context.Context, args GetUpdateArgs) (*WorkItemUpdate, error) {
+ routeValues := make(map[string]string)
+ if args.Project != nil && *args.Project != "" {
+ routeValues["project"] = *args.Project
+ }
+ if args.Id == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.Id"}
+ }
+ routeValues["id"] = strconv.Itoa(*args.Id)
+ if args.UpdateNumber == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.UpdateNumber"}
+ }
+ routeValues["updateNumber"] = strconv.Itoa(*args.UpdateNumber)
+
+ locationId, _ := uuid.Parse("6570bf97-d02c-4a91-8d93-3abe9895b1a9")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue WorkItemUpdate
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetUpdate function
+type GetUpdateArgs struct {
+ // (required)
+ Id *int
+ // (required)
+ UpdateNumber *int
+ // (optional) Project ID or project name
+ Project *string
+}
+
+// Returns a the deltas between work item revisions
+func (client *ClientImpl) GetUpdates(ctx context.Context, args GetUpdatesArgs) (*[]WorkItemUpdate, error) {
+ routeValues := make(map[string]string)
+ if args.Project != nil && *args.Project != "" {
+ routeValues["project"] = *args.Project
+ }
+ if args.Id == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.Id"}
+ }
+ routeValues["id"] = strconv.Itoa(*args.Id)
+
+ queryParams := url.Values{}
+ if args.Top != nil {
+ queryParams.Add("$top", strconv.Itoa(*args.Top))
+ }
+ if args.Skip != nil {
+ queryParams.Add("$skip", strconv.Itoa(*args.Skip))
+ }
+ locationId, _ := uuid.Parse("6570bf97-d02c-4a91-8d93-3abe9895b1a9")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []WorkItemUpdate
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetUpdates function
+type GetUpdatesArgs struct {
+ // (required)
+ Id *int
+ // (optional) Project ID or project name
+ Project *string
+ // (optional)
+ Top *int
+ // (optional)
+ Skip *int
+}
+
+// [Preview API] Get the list of work item tracking outbound artifact link types.
+func (client *ClientImpl) GetWorkArtifactLinkTypes(ctx context.Context, args GetWorkArtifactLinkTypesArgs) (*[]WorkArtifactLink, error) {
+ locationId, _ := uuid.Parse("1a31de40-e318-41cd-a6c6-881077df52e3")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", nil, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []WorkArtifactLink
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetWorkArtifactLinkTypes function
+type GetWorkArtifactLinkTypesArgs struct {
+}
+
+// Returns a single work item.
+func (client *ClientImpl) GetWorkItem(ctx context.Context, args GetWorkItemArgs) (*WorkItem, error) {
+ routeValues := make(map[string]string)
+ if args.Project != nil && *args.Project != "" {
+ routeValues["project"] = *args.Project
+ }
+ if args.Id == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.Id"}
+ }
+ routeValues["id"] = strconv.Itoa(*args.Id)
+
+ queryParams := url.Values{}
+ if args.Fields != nil {
+ listAsString := strings.Join((*args.Fields)[:], ",")
+ queryParams.Add("fields", listAsString)
+ }
+ if args.AsOf != nil {
+ queryParams.Add("asOf", (*args.AsOf).String())
+ }
+ if args.Expand != nil {
+ queryParams.Add("$expand", string(*args.Expand))
+ }
+ locationId, _ := uuid.Parse("72c7ddf8-2cdc-4f60-90cd-ab71c14a399b")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue WorkItem
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetWorkItem function
+type GetWorkItemArgs struct {
+ // (required) The work item id
+ Id *int
+ // (optional) Project ID or project name
+ Project *string
+ // (optional) Comma-separated list of requested fields
+ Fields *[]string
+ // (optional) AsOf UTC date time string
+ AsOf *azuredevops.Time
+ // (optional) The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }.
+ Expand *WorkItemExpand
+}
+
+// Get a work item icon given the friendly name and icon color.
+func (client *ClientImpl) GetWorkItemIconJson(ctx context.Context, args GetWorkItemIconJsonArgs) (*WorkItemIcon, error) {
+ routeValues := make(map[string]string)
+ if args.Icon == nil || *args.Icon == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Icon"}
+ }
+ routeValues["icon"] = *args.Icon
+
+ queryParams := url.Values{}
+ if args.Color != nil {
+ queryParams.Add("color", *args.Color)
+ }
+ if args.V != nil {
+ queryParams.Add("v", strconv.Itoa(*args.V))
+ }
+ locationId, _ := uuid.Parse("4e1eb4a5-1970-4228-a682-ec48eb2dca30")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue WorkItemIcon
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetWorkItemIconJson function
+type GetWorkItemIconJsonArgs struct {
+ // (required) The name of the icon
+ Icon *string
+ // (optional) The 6-digit hex color for the icon
+ Color *string
+ // (optional) The version of the icon (used only for cache invalidation)
+ V *int
+}
+
+// Get a list of all work item icons.
+func (client *ClientImpl) GetWorkItemIcons(ctx context.Context, args GetWorkItemIconsArgs) (*[]WorkItemIcon, error) {
+ locationId, _ := uuid.Parse("4e1eb4a5-1970-4228-a682-ec48eb2dca30")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", nil, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []WorkItemIcon
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetWorkItemIcons function
+type GetWorkItemIconsArgs struct {
+}
+
+// Get a work item icon given the friendly name and icon color.
+func (client *ClientImpl) GetWorkItemIconSvg(ctx context.Context, args GetWorkItemIconSvgArgs) (io.ReadCloser, error) {
+ routeValues := make(map[string]string)
+ if args.Icon == nil || *args.Icon == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Icon"}
+ }
+ routeValues["icon"] = *args.Icon
+
+ queryParams := url.Values{}
+ if args.Color != nil {
+ queryParams.Add("color", *args.Color)
+ }
+ if args.V != nil {
+ queryParams.Add("v", strconv.Itoa(*args.V))
+ }
+ locationId, _ := uuid.Parse("4e1eb4a5-1970-4228-a682-ec48eb2dca30")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "image/svg+xml", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ return resp.Body, err
+}
+
+// Arguments for the GetWorkItemIconSvg function
+type GetWorkItemIconSvgArgs struct {
+ // (required) The name of the icon
+ Icon *string
+ // (optional) The 6-digit hex color for the icon
+ Color *string
+ // (optional) The version of the icon (used only for cache invalidation)
+ V *int
+}
+
+// Get a work item icon given the friendly name and icon color.
+func (client *ClientImpl) GetWorkItemIconXaml(ctx context.Context, args GetWorkItemIconXamlArgs) (io.ReadCloser, error) {
+ routeValues := make(map[string]string)
+ if args.Icon == nil || *args.Icon == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Icon"}
+ }
+ routeValues["icon"] = *args.Icon
+
+ queryParams := url.Values{}
+ if args.Color != nil {
+ queryParams.Add("color", *args.Color)
+ }
+ if args.V != nil {
+ queryParams.Add("v", strconv.Itoa(*args.V))
+ }
+ locationId, _ := uuid.Parse("4e1eb4a5-1970-4228-a682-ec48eb2dca30")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "image/xaml+xml", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ return resp.Body, err
+}
+
+// Arguments for the GetWorkItemIconXaml function
+type GetWorkItemIconXamlArgs struct {
+ // (required) The name of the icon
+ Icon *string
+ // (optional) The 6-digit hex color for the icon
+ Color *string
+ // (optional) The version of the icon (used only for cache invalidation)
+ V *int
+}
+
+// [Preview API] Returns the next state on the given work item IDs.
+func (client *ClientImpl) GetWorkItemNextStatesOnCheckinAction(ctx context.Context, args GetWorkItemNextStatesOnCheckinActionArgs) (*[]WorkItemNextStateOnTransition, error) {
+ queryParams := url.Values{}
+ if args.Ids == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "ids"}
+ }
+ var stringList []string
+ for _, item := range *args.Ids {
+ stringList = append(stringList, strconv.Itoa(item))
+ }
+ listAsString := strings.Join((stringList)[:], ",")
+ queryParams.Add("ids", listAsString)
+ if args.Action != nil {
+ queryParams.Add("action", *args.Action)
+ }
+ locationId, _ := uuid.Parse("afae844b-e2f6-44c2-8053-17b3bb936a40")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", nil, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []WorkItemNextStateOnTransition
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetWorkItemNextStatesOnCheckinAction function
+type GetWorkItemNextStatesOnCheckinActionArgs struct {
+ // (required) list of work item ids
+ Ids *[]int
+ // (optional) possible actions. Currently only supports checkin
+ Action *string
+}
+
+// Returns a list of work items (Maximum 200)
+func (client *ClientImpl) GetWorkItems(ctx context.Context, args GetWorkItemsArgs) (*[]WorkItem, error) {
+ routeValues := make(map[string]string)
+ if args.Project != nil && *args.Project != "" {
+ routeValues["project"] = *args.Project
+ }
+
+ queryParams := url.Values{}
+ if args.Ids == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "ids"}
+ }
+ var stringList []string
+ for _, item := range *args.Ids {
+ stringList = append(stringList, strconv.Itoa(item))
+ }
+ listAsString := strings.Join((stringList)[:], ",")
+ queryParams.Add("ids", listAsString)
+ if args.Fields != nil {
+ listAsString := strings.Join((*args.Fields)[:], ",")
+ queryParams.Add("fields", listAsString)
+ }
+ if args.AsOf != nil {
+ queryParams.Add("asOf", (*args.AsOf).String())
+ }
+ if args.Expand != nil {
+ queryParams.Add("$expand", string(*args.Expand))
+ }
+ if args.ErrorPolicy != nil {
+ queryParams.Add("errorPolicy", string(*args.ErrorPolicy))
+ }
+ locationId, _ := uuid.Parse("72c7ddf8-2cdc-4f60-90cd-ab71c14a399b")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []WorkItem
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetWorkItems function
+type GetWorkItemsArgs struct {
+ // (required) The comma-separated list of requested work item ids. (Maximum 200 ids allowed).
+ Ids *[]int
+ // (optional) Project ID or project name
+ Project *string
+ // (optional) Comma-separated list of requested fields
+ Fields *[]string
+ // (optional) AsOf UTC date time string
+ AsOf *azuredevops.Time
+ // (optional) The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }.
+ Expand *WorkItemExpand
+ // (optional) The flag to control error policy in a bulk get work items request. Possible options are {Fail, Omit}.
+ ErrorPolicy *WorkItemErrorPolicy
+}
+
+// Gets work items for a list of work item ids (Maximum 200)
+func (client *ClientImpl) GetWorkItemsBatch(ctx context.Context, args GetWorkItemsBatchArgs) (*[]WorkItem, error) {
+ if args.WorkItemGetRequest == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.WorkItemGetRequest"}
+ }
+ routeValues := make(map[string]string)
+ if args.Project != nil && *args.Project != "" {
+ routeValues["project"] = *args.Project
+ }
+
+ body, marshalErr := json.Marshal(*args.WorkItemGetRequest)
+ if marshalErr != nil {
+ return nil, marshalErr
+ }
+ locationId, _ := uuid.Parse("908509b6-4248-4475-a1cd-829139ba419f")
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []WorkItem
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetWorkItemsBatch function
+type GetWorkItemsBatchArgs struct {
+ // (required)
+ WorkItemGetRequest *WorkItemBatchGetRequest
+ // (optional) Project ID or project name
+ Project *string
+}
+
+// Returns a single work item from a template.
+func (client *ClientImpl) GetWorkItemTemplate(ctx context.Context, args GetWorkItemTemplateArgs) (*WorkItem, error) {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.Type == nil || *args.Type == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Type"}
+ }
+ routeValues["type"] = *args.Type
+
+ queryParams := url.Values{}
+ if args.Fields != nil {
+ queryParams.Add("fields", *args.Fields)
+ }
+ if args.AsOf != nil {
+ queryParams.Add("asOf", (*args.AsOf).String())
+ }
+ if args.Expand != nil {
+ queryParams.Add("$expand", string(*args.Expand))
+ }
+ locationId, _ := uuid.Parse("62d3d110-0047-428c-ad3c-4fe872c91c74")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue WorkItem
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetWorkItemTemplate function
+type GetWorkItemTemplateArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (required) The work item type name
+ Type *string
+ // (optional) Comma-separated list of requested fields
+ Fields *string
+ // (optional) AsOf UTC date time string
+ AsOf *azuredevops.Time
+ // (optional) The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }.
+ Expand *WorkItemExpand
+}
+
+// Returns a work item type definition.
+func (client *ClientImpl) GetWorkItemType(ctx context.Context, args GetWorkItemTypeArgs) (*WorkItemType, error) {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.Type == nil || *args.Type == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Type"}
+ }
+ routeValues["type"] = *args.Type
+
+ locationId, _ := uuid.Parse("7c8d7a76-4a09-43e8-b5df-bd792f4ac6aa")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue WorkItemType
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetWorkItemType function
+type GetWorkItemTypeArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (required) Work item type name
+ Type *string
+}
+
+// Get all work item type categories.
+func (client *ClientImpl) GetWorkItemTypeCategories(ctx context.Context, args GetWorkItemTypeCategoriesArgs) (*[]WorkItemTypeCategory, error) {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+
+ locationId, _ := uuid.Parse("9b9f5734-36c8-415e-ba67-f83b45c31408")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []WorkItemTypeCategory
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetWorkItemTypeCategories function
+type GetWorkItemTypeCategoriesArgs struct {
+ // (required) Project ID or project name
+ Project *string
+}
+
+// Get specific work item type category by name.
+func (client *ClientImpl) GetWorkItemTypeCategory(ctx context.Context, args GetWorkItemTypeCategoryArgs) (*WorkItemTypeCategory, error) {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.Category == nil || *args.Category == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Category"}
+ }
+ routeValues["category"] = *args.Category
+
+ locationId, _ := uuid.Parse("9b9f5734-36c8-415e-ba67-f83b45c31408")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue WorkItemTypeCategory
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetWorkItemTypeCategory function
+type GetWorkItemTypeCategoryArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (required) The category name
+ Category *string
+}
+
+// Get a list of fields for a work item type with detailed references.
+func (client *ClientImpl) GetWorkItemTypeFieldsWithReferences(ctx context.Context, args GetWorkItemTypeFieldsWithReferencesArgs) (*[]WorkItemTypeFieldWithReferences, error) {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.Type == nil || *args.Type == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Type"}
+ }
+ routeValues["type"] = *args.Type
+
+ queryParams := url.Values{}
+ if args.Expand != nil {
+ queryParams.Add("$expand", string(*args.Expand))
+ }
+ locationId, _ := uuid.Parse("bd293ce5-3d25-4192-8e67-e8092e879efb")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []WorkItemTypeFieldWithReferences
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetWorkItemTypeFieldsWithReferences function
+type GetWorkItemTypeFieldsWithReferencesArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (required) Work item type.
+ Type *string
+ // (optional) Expand level for the API response. Properties: to include allowedvalues, default value, isRequired etc. as a part of response; None: to skip these properties.
+ Expand *WorkItemTypeFieldsExpandLevel
+}
+
+// Get a field for a work item type with detailed references.
+func (client *ClientImpl) GetWorkItemTypeFieldWithReferences(ctx context.Context, args GetWorkItemTypeFieldWithReferencesArgs) (*WorkItemTypeFieldWithReferences, error) {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.Type == nil || *args.Type == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Type"}
+ }
+ routeValues["type"] = *args.Type
+ if args.Field == nil || *args.Field == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Field"}
+ }
+ routeValues["field"] = *args.Field
+
+ queryParams := url.Values{}
+ if args.Expand != nil {
+ queryParams.Add("$expand", string(*args.Expand))
+ }
+ locationId, _ := uuid.Parse("bd293ce5-3d25-4192-8e67-e8092e879efb")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue WorkItemTypeFieldWithReferences
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetWorkItemTypeFieldWithReferences function
+type GetWorkItemTypeFieldWithReferencesArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (required) Work item type.
+ Type *string
+ // (required)
+ Field *string
+ // (optional) Expand level for the API response. Properties: to include allowedvalues, default value, isRequired etc. as a part of response; None: to skip these properties.
+ Expand *WorkItemTypeFieldsExpandLevel
+}
+
+// Returns the list of work item types
+func (client *ClientImpl) GetWorkItemTypes(ctx context.Context, args GetWorkItemTypesArgs) (*[]WorkItemType, error) {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+
+ locationId, _ := uuid.Parse("7c8d7a76-4a09-43e8-b5df-bd792f4ac6aa")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []WorkItemType
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetWorkItemTypes function
+type GetWorkItemTypesArgs struct {
+ // (required) Project ID or project name
+ Project *string
+}
+
+// [Preview API] Returns the state names and colors for a work item type.
+func (client *ClientImpl) GetWorkItemTypeStates(ctx context.Context, args GetWorkItemTypeStatesArgs) (*[]WorkItemStateColor, error) {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.Type == nil || *args.Type == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Type"}
+ }
+ routeValues["type"] = *args.Type
+
+ locationId, _ := uuid.Parse("7c9d7a76-4a09-43e8-b5df-bd792f4ac6aa")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, nil, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue []WorkItemStateColor
+ err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the GetWorkItemTypeStates function
+type GetWorkItemTypeStatesArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (required) The state name
+ Type *string
+}
+
+// [Preview API] Migrates a project to a different process within the same OOB type. For example, you can only migrate a project from agile/custom-agile to agile/custom-agile.
+func (client *ClientImpl) MigrateProjectsProcess(ctx context.Context, args MigrateProjectsProcessArgs) (*ProcessMigrationResultModel, error) {
+ if args.NewProcess == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.NewProcess"}
+ }
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+
+ body, marshalErr := json.Marshal(*args.NewProcess)
+ if marshalErr != nil {
+ return nil, marshalErr
+ }
+ locationId, _ := uuid.Parse("19801631-d4e5-47e9-8166-0330de0ff1e6")
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue ProcessMigrationResultModel
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the MigrateProjectsProcess function
+type MigrateProjectsProcessArgs struct {
+ // (required)
+ NewProcess *ProcessIdModel
+ // (required) Project ID or project name
+ Project *string
+}
+
+// Gets the results of the query given the query ID.
+func (client *ClientImpl) QueryById(ctx context.Context, args QueryByIdArgs) (*WorkItemQueryResult, error) {
+ routeValues := make(map[string]string)
+ if args.Project != nil && *args.Project != "" {
+ routeValues["project"] = *args.Project
+ }
+ if args.Team != nil && *args.Team != "" {
+ routeValues["team"] = *args.Team
+ }
+ if args.Id == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.Id"}
+ }
+ routeValues["id"] = (*args.Id).String()
+
+ queryParams := url.Values{}
+ if args.TimePrecision != nil {
+ queryParams.Add("timePrecision", strconv.FormatBool(*args.TimePrecision))
+ }
+ if args.Top != nil {
+ queryParams.Add("$top", strconv.Itoa(*args.Top))
+ }
+ locationId, _ := uuid.Parse("a02355f5-5f8a-4671-8e32-369d23aac83d")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue WorkItemQueryResult
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the QueryById function
+type QueryByIdArgs struct {
+ // (required) The query ID.
+ Id *uuid.UUID
+ // (optional) Project ID or project name
+ Project *string
+ // (optional) Team ID or team name
+ Team *string
+ // (optional) Whether or not to use time precision.
+ TimePrecision *bool
+ // (optional) The max number of results to return.
+ Top *int
+}
+
+// Gets the results of the query given its WIQL.
+func (client *ClientImpl) QueryByWiql(ctx context.Context, args QueryByWiqlArgs) (*WorkItemQueryResult, error) {
+ if args.Wiql == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.Wiql"}
+ }
+ routeValues := make(map[string]string)
+ if args.Project != nil && *args.Project != "" {
+ routeValues["project"] = *args.Project
+ }
+ if args.Team != nil && *args.Team != "" {
+ routeValues["team"] = *args.Team
+ }
+
+ queryParams := url.Values{}
+ if args.TimePrecision != nil {
+ queryParams.Add("timePrecision", strconv.FormatBool(*args.TimePrecision))
+ }
+ if args.Top != nil {
+ queryParams.Add("$top", strconv.Itoa(*args.Top))
+ }
+ body, marshalErr := json.Marshal(*args.Wiql)
+ if marshalErr != nil {
+ return nil, marshalErr
+ }
+ locationId, _ := uuid.Parse("1a9c53f7-f243-4447-b110-35ef023636e4")
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue WorkItemQueryResult
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the QueryByWiql function
+type QueryByWiqlArgs struct {
+ // (required) The query containing the WIQL.
+ Wiql *Wiql
+ // (optional) Project ID or project name
+ Project *string
+ // (optional) Team ID or team name
+ Team *string
+ // (optional) Whether or not to use time precision.
+ TimePrecision *bool
+ // (optional) The max number of results to return.
+ Top *int
+}
+
+// [Preview API] Queries work items linked to a given list of artifact URI.
+func (client *ClientImpl) QueryWorkItemsForArtifactUris(ctx context.Context, args QueryWorkItemsForArtifactUrisArgs) (*ArtifactUriQueryResult, error) {
+ if args.ArtifactUriQuery == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.ArtifactUriQuery"}
+ }
+ routeValues := make(map[string]string)
+ if args.Project != nil && *args.Project != "" {
+ routeValues["project"] = *args.Project
+ }
+
+ body, marshalErr := json.Marshal(*args.ArtifactUriQuery)
+ if marshalErr != nil {
+ return nil, marshalErr
+ }
+ locationId, _ := uuid.Parse("a9a9aa7a-8c09-44d3-ad1b-46e855c1e3d3")
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue ArtifactUriQueryResult
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the QueryWorkItemsForArtifactUris function
+type QueryWorkItemsForArtifactUrisArgs struct {
+ // (required) Defines a list of artifact URI for querying work items.
+ ArtifactUriQuery *ArtifactUriQuery
+ // (optional) Project ID or project name
+ Project *string
+}
+
+// [Preview API]
+func (client *ClientImpl) ReadReportingDiscussions(ctx context.Context, args ReadReportingDiscussionsArgs) (*ReportingWorkItemRevisionsBatch, error) {
+ routeValues := make(map[string]string)
+ if args.Project != nil && *args.Project != "" {
+ routeValues["project"] = *args.Project
+ }
+
+ queryParams := url.Values{}
+ if args.ContinuationToken != nil {
+ queryParams.Add("continuationToken", *args.ContinuationToken)
+ }
+ if args.MaxPageSize != nil {
+ queryParams.Add("$maxPageSize", strconv.Itoa(*args.MaxPageSize))
+ }
+ locationId, _ := uuid.Parse("4a644469-90c5-4fcc-9a9f-be0827d369ec")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue ReportingWorkItemRevisionsBatch
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the ReadReportingDiscussions function
+type ReadReportingDiscussionsArgs struct {
+ // (optional) Project ID or project name
+ Project *string
+ // (optional)
+ ContinuationToken *string
+ // (optional)
+ MaxPageSize *int
+}
+
+// Get a batch of work item revisions with the option of including deleted items
+func (client *ClientImpl) ReadReportingRevisionsGet(ctx context.Context, args ReadReportingRevisionsGetArgs) (*ReportingWorkItemRevisionsBatch, error) {
+ routeValues := make(map[string]string)
+ if args.Project != nil && *args.Project != "" {
+ routeValues["project"] = *args.Project
+ }
+
+ queryParams := url.Values{}
+ if args.Fields != nil {
+ listAsString := strings.Join((*args.Fields)[:], ",")
+ queryParams.Add("fields", listAsString)
+ }
+ if args.Types != nil {
+ listAsString := strings.Join((*args.Types)[:], ",")
+ queryParams.Add("types", listAsString)
+ }
+ if args.ContinuationToken != nil {
+ queryParams.Add("continuationToken", *args.ContinuationToken)
+ }
+ if args.StartDateTime != nil {
+ queryParams.Add("startDateTime", (*args.StartDateTime).AsQueryParameter())
+ }
+ if args.IncludeIdentityRef != nil {
+ queryParams.Add("includeIdentityRef", strconv.FormatBool(*args.IncludeIdentityRef))
+ }
+ if args.IncludeDeleted != nil {
+ queryParams.Add("includeDeleted", strconv.FormatBool(*args.IncludeDeleted))
+ }
+ if args.IncludeTagRef != nil {
+ queryParams.Add("includeTagRef", strconv.FormatBool(*args.IncludeTagRef))
+ }
+ if args.IncludeLatestOnly != nil {
+ queryParams.Add("includeLatestOnly", strconv.FormatBool(*args.IncludeLatestOnly))
+ }
+ if args.Expand != nil {
+ queryParams.Add("$expand", string(*args.Expand))
+ }
+ if args.IncludeDiscussionChangesOnly != nil {
+ queryParams.Add("includeDiscussionChangesOnly", strconv.FormatBool(*args.IncludeDiscussionChangesOnly))
+ }
+ if args.MaxPageSize != nil {
+ queryParams.Add("$maxPageSize", strconv.Itoa(*args.MaxPageSize))
+ }
+ locationId, _ := uuid.Parse("f828fe59-dd87-495d-a17c-7a8d6211ca6c")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue ReportingWorkItemRevisionsBatch
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the ReadReportingRevisionsGet function
+type ReadReportingRevisionsGetArgs struct {
+ // (optional) Project ID or project name
+ Project *string
+ // (optional) A list of fields to return in work item revisions. Omit this parameter to get all reportable fields.
+ Fields *[]string
+ // (optional) A list of types to filter the results to specific work item types. Omit this parameter to get work item revisions of all work item types.
+ Types *[]string
+ // (optional) Specifies the watermark to start the batch from. Omit this parameter to get the first batch of revisions.
+ ContinuationToken *string
+ // (optional) Date/time to use as a starting point for revisions, all revisions will occur after this date/time. Cannot be used in conjunction with 'watermark' parameter.
+ StartDateTime *azuredevops.Time
+ // (optional) Return an identity reference instead of a string value for identity fields.
+ IncludeIdentityRef *bool
+ // (optional) Specify if the deleted item should be returned.
+ IncludeDeleted *bool
+ // (optional) Specify if the tag objects should be returned for System.Tags field.
+ IncludeTagRef *bool
+ // (optional) Return only the latest revisions of work items, skipping all historical revisions
+ IncludeLatestOnly *bool
+ // (optional) Return all the fields in work item revisions, including long text fields which are not returned by default
+ Expand *ReportingRevisionsExpand
+ // (optional) Return only the those revisions of work items, where only history field was changed
+ IncludeDiscussionChangesOnly *bool
+ // (optional) The maximum number of results to return in this batch
+ MaxPageSize *int
+}
+
+// Get a batch of work item revisions. This request may be used if your list of fields is large enough that it may run the URL over the length limit.
+func (client *ClientImpl) ReadReportingRevisionsPost(ctx context.Context, args ReadReportingRevisionsPostArgs) (*ReportingWorkItemRevisionsBatch, error) {
+ if args.Filter == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.Filter"}
+ }
+ routeValues := make(map[string]string)
+ if args.Project != nil && *args.Project != "" {
+ routeValues["project"] = *args.Project
+ }
+
+ queryParams := url.Values{}
+ if args.ContinuationToken != nil {
+ queryParams.Add("continuationToken", *args.ContinuationToken)
+ }
+ if args.StartDateTime != nil {
+ queryParams.Add("startDateTime", (*args.StartDateTime).AsQueryParameter())
+ }
+ if args.Expand != nil {
+ queryParams.Add("$expand", string(*args.Expand))
+ }
+ body, marshalErr := json.Marshal(*args.Filter)
+ if marshalErr != nil {
+ return nil, marshalErr
+ }
+ locationId, _ := uuid.Parse("f828fe59-dd87-495d-a17c-7a8d6211ca6c")
+ resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "6.0", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue ReportingWorkItemRevisionsBatch
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the ReadReportingRevisionsPost function
+type ReadReportingRevisionsPostArgs struct {
+ // (required) An object that contains request settings: field filter, type filter, identity format
+ Filter *ReportingWorkItemRevisionsFilter
+ // (optional) Project ID or project name
+ Project *string
+ // (optional) Specifies the watermark to start the batch from. Omit this parameter to get the first batch of revisions.
+ ContinuationToken *string
+ // (optional) Date/time to use as a starting point for revisions, all revisions will occur after this date/time. Cannot be used in conjunction with 'watermark' parameter.
+ StartDateTime *azuredevops.Time
+ // (optional)
+ Expand *ReportingRevisionsExpand
+}
+
+// [Preview API] Replace template contents
+func (client *ClientImpl) ReplaceTemplate(ctx context.Context, args ReplaceTemplateArgs) (*WorkItemTemplate, error) {
+ if args.TemplateContent == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.TemplateContent"}
+ }
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.Team == nil || *args.Team == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Team"}
+ }
+ routeValues["team"] = *args.Team
+ if args.TemplateId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.TemplateId"}
+ }
+ routeValues["templateId"] = (*args.TemplateId).String()
+
+ body, marshalErr := json.Marshal(*args.TemplateContent)
+ if marshalErr != nil {
+ return nil, marshalErr
+ }
+ locationId, _ := uuid.Parse("fb10264a-8836-48a0-8033-1b0ccd2748d5")
+ resp, err := client.Client.Send(ctx, http.MethodPut, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue WorkItemTemplate
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the ReplaceTemplate function
+type ReplaceTemplateArgs struct {
+ // (required) Template contents to replace with
+ TemplateContent *WorkItemTemplate
+ // (required) Project ID or project name
+ Project *string
+ // (required) Team ID or team name
+ Team *string
+ // (required) Template id
+ TemplateId *uuid.UUID
+}
+
+// Restores the deleted work item from Recycle Bin.
+func (client *ClientImpl) RestoreWorkItem(ctx context.Context, args RestoreWorkItemArgs) (*WorkItemDelete, error) {
+ if args.Payload == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.Payload"}
+ }
+ routeValues := make(map[string]string)
+ if args.Project != nil && *args.Project != "" {
+ routeValues["project"] = *args.Project
+ }
+ if args.Id == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.Id"}
+ }
+ routeValues["id"] = strconv.Itoa(*args.Id)
+
+ body, marshalErr := json.Marshal(*args.Payload)
+ if marshalErr != nil {
+ return nil, marshalErr
+ }
+ locationId, _ := uuid.Parse("b70d8d39-926c-465e-b927-b1bf0e5ca0e0")
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue WorkItemDelete
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the RestoreWorkItem function
+type RestoreWorkItemArgs struct {
+ // (required) Paylod with instructions to update the IsDeleted flag to false
+ Payload *WorkItemDeleteUpdate
+ // (required) ID of the work item to be restored
+ Id *int
+ // (optional) Project ID or project name
+ Project *string
+}
+
+// Searches all queries the user has access to in the current project
+func (client *ClientImpl) SearchQueries(ctx context.Context, args SearchQueriesArgs) (*QueryHierarchyItemsResult, error) {
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+
+ queryParams := url.Values{}
+ if args.Filter == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "filter"}
+ }
+ queryParams.Add("$filter", *args.Filter)
+ if args.Top != nil {
+ queryParams.Add("$top", strconv.Itoa(*args.Top))
+ }
+ if args.Expand != nil {
+ queryParams.Add("$expand", string(*args.Expand))
+ }
+ if args.IncludeDeleted != nil {
+ queryParams.Add("$includeDeleted", strconv.FormatBool(*args.IncludeDeleted))
+ }
+ locationId, _ := uuid.Parse("a67d190c-c41f-424b-814d-0e906f659301")
+ resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "6.0", routeValues, queryParams, nil, "", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue QueryHierarchyItemsResult
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the SearchQueries function
+type SearchQueriesArgs struct {
+ // (required) Project ID or project name
+ Project *string
+ // (required) The text to filter the queries with.
+ Filter *string
+ // (optional) The number of queries to return (Default is 50 and maximum is 200).
+ Top *int
+ // (optional)
+ Expand *QueryExpand
+ // (optional) Include deleted queries and folders
+ IncludeDeleted *bool
+}
+
+// Update an existing classification node.
+func (client *ClientImpl) UpdateClassificationNode(ctx context.Context, args UpdateClassificationNodeArgs) (*WorkItemClassificationNode, error) {
+ if args.PostedNode == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.PostedNode"}
+ }
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.StructureGroup == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.StructureGroup"}
+ }
+ routeValues["structureGroup"] = string(*args.StructureGroup)
+ if args.Path != nil && *args.Path != "" {
+ routeValues["path"] = *args.Path
+ }
+
+ body, marshalErr := json.Marshal(*args.PostedNode)
+ if marshalErr != nil {
+ return nil, marshalErr
+ }
+ locationId, _ := uuid.Parse("5a172953-1b41-49d3-840a-33f79c3ce89f")
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue WorkItemClassificationNode
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the UpdateClassificationNode function
+type UpdateClassificationNodeArgs struct {
+ // (required) Node to create or update.
+ PostedNode *WorkItemClassificationNode
+ // (required) Project ID or project name
+ Project *string
+ // (required) Structure group of the classification node, area or iteration.
+ StructureGroup *TreeStructureGroup
+ // (optional) Path of the classification node.
+ Path *string
+}
+
+// [Preview API] Update a comment on a work item.
+func (client *ClientImpl) UpdateComment(ctx context.Context, args UpdateCommentArgs) (*Comment, error) {
+ if args.Request == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.Request"}
+ }
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.WorkItemId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.WorkItemId"}
+ }
+ routeValues["workItemId"] = strconv.Itoa(*args.WorkItemId)
+ if args.CommentId == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.CommentId"}
+ }
+ routeValues["commentId"] = strconv.Itoa(*args.CommentId)
+
+ body, marshalErr := json.Marshal(*args.Request)
+ if marshalErr != nil {
+ return nil, marshalErr
+ }
+ locationId, _ := uuid.Parse("608aac0a-32e1-4493-a863-b9cf4566d257")
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0-preview.3", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue Comment
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the UpdateComment function
+type UpdateCommentArgs struct {
+ // (required) Comment update request.
+ Request *CommentUpdate
+ // (required) Project ID or project name
+ Project *string
+ // (required) Id of a work item.
+ WorkItemId *int
+ // (required)
+ CommentId *int
+}
+
+// Update a field.
+func (client *ClientImpl) UpdateField(ctx context.Context, args UpdateFieldArgs) (*WorkItemField, error) {
+ if args.Payload == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.Payload"}
+ }
+ routeValues := make(map[string]string)
+ if args.Project != nil && *args.Project != "" {
+ routeValues["project"] = *args.Project
+ }
+ if args.FieldNameOrRefName == nil || *args.FieldNameOrRefName == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.FieldNameOrRefName"}
+ }
+ routeValues["fieldNameOrRefName"] = *args.FieldNameOrRefName
+
+ body, marshalErr := json.Marshal(*args.Payload)
+ if marshalErr != nil {
+ return nil, marshalErr
+ }
+ locationId, _ := uuid.Parse("b51fd764-e5c2-4b9b-aaf7-3395cf4bdd94")
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue WorkItemField
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the UpdateField function
+type UpdateFieldArgs struct {
+ // (required) Payload contains desired value of the field's properties
+ Payload *UpdateWorkItemField
+ // (required) Name/reference name of the field to be updated
+ FieldNameOrRefName *string
+ // (optional) Project ID or project name
+ Project *string
+}
+
+// Update a query or a folder. This allows you to update, rename and move queries and folders.
+func (client *ClientImpl) UpdateQuery(ctx context.Context, args UpdateQueryArgs) (*QueryHierarchyItem, error) {
+ if args.QueryUpdate == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.QueryUpdate"}
+ }
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.Query == nil || *args.Query == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Query"}
+ }
+ routeValues["query"] = *args.Query
+
+ queryParams := url.Values{}
+ if args.UndeleteDescendants != nil {
+ queryParams.Add("$undeleteDescendants", strconv.FormatBool(*args.UndeleteDescendants))
+ }
+ body, marshalErr := json.Marshal(*args.QueryUpdate)
+ if marshalErr != nil {
+ return nil, marshalErr
+ }
+ locationId, _ := uuid.Parse("a67d190c-c41f-424b-814d-0e906f659301")
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0", routeValues, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue QueryHierarchyItem
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the UpdateQuery function
+type UpdateQueryArgs struct {
+ // (required) The query to update.
+ QueryUpdate *QueryHierarchyItem
+ // (required) Project ID or project name
+ Project *string
+ // (required) The ID or path for the query to update.
+ Query *string
+ // (optional) Undelete the children of this folder. It is important to note that this will not bring back the permission changes that were previously applied to the descendants.
+ UndeleteDescendants *bool
+}
+
+// [Preview API]
+func (client *ClientImpl) UpdateTag(ctx context.Context, args UpdateTagArgs) (*WorkItemTagDefinition, error) {
+ if args.TagData == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.TagData"}
+ }
+ routeValues := make(map[string]string)
+ if args.Project == nil || *args.Project == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
+ }
+ routeValues["project"] = *args.Project
+ if args.TagIdOrName == nil || *args.TagIdOrName == "" {
+ return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.TagIdOrName"}
+ }
+ routeValues["tagIdOrName"] = *args.TagIdOrName
+
+ body, marshalErr := json.Marshal(*args.TagData)
+ if marshalErr != nil {
+ return nil, marshalErr
+ }
+ locationId, _ := uuid.Parse("bc15bc60-e7a8-43cb-ab01-2106be3983a1")
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0-preview.1", routeValues, nil, bytes.NewReader(body), "application/json", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue WorkItemTagDefinition
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the UpdateTag function
+type UpdateTagArgs struct {
+ // (required)
+ TagData *WorkItemTagDefinition
+ // (required) Project ID or project name
+ Project *string
+ // (required)
+ TagIdOrName *string
+}
+
+// Updates a single work item.
+func (client *ClientImpl) UpdateWorkItem(ctx context.Context, args UpdateWorkItemArgs) (*WorkItem, error) {
+ if args.Document == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.Document"}
+ }
+ routeValues := make(map[string]string)
+ if args.Project != nil && *args.Project != "" {
+ routeValues["project"] = *args.Project
+ }
+ if args.Id == nil {
+ return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.Id"}
+ }
+ routeValues["id"] = strconv.Itoa(*args.Id)
+
+ queryParams := url.Values{}
+ if args.ValidateOnly != nil {
+ queryParams.Add("validateOnly", strconv.FormatBool(*args.ValidateOnly))
+ }
+ if args.BypassRules != nil {
+ queryParams.Add("bypassRules", strconv.FormatBool(*args.BypassRules))
+ }
+ if args.SuppressNotifications != nil {
+ queryParams.Add("suppressNotifications", strconv.FormatBool(*args.SuppressNotifications))
+ }
+ if args.Expand != nil {
+ queryParams.Add("$expand", string(*args.Expand))
+ }
+ body, marshalErr := json.Marshal(*args.Document)
+ if marshalErr != nil {
+ return nil, marshalErr
+ }
+ locationId, _ := uuid.Parse("72c7ddf8-2cdc-4f60-90cd-ab71c14a399b")
+ resp, err := client.Client.Send(ctx, http.MethodPatch, locationId, "6.0", routeValues, queryParams, bytes.NewReader(body), "application/json-patch+json", "application/json", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var responseValue WorkItem
+ err = client.Client.UnmarshalBody(resp, &responseValue)
+ return &responseValue, err
+}
+
+// Arguments for the UpdateWorkItem function
+type UpdateWorkItemArgs struct {
+ // (required) The JSON Patch document representing the update
+ Document *[]webapi.JsonPatchOperation
+ // (required) The id of the work item to update
+ Id *int
+ // (optional) Project ID or project name
+ Project *string
+ // (optional) Indicate if you only want to validate the changes without saving the work item
+ ValidateOnly *bool
+ // (optional) Do not enforce the work item type rules on this update
+ BypassRules *bool
+ // (optional) Do not fire any notifications for this change
+ SuppressNotifications *bool
+ // (optional) The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }.
+ Expand *WorkItemExpand
+}
diff --git a/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/workitemtracking/models.go b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/workitemtracking/models.go
new file mode 100644
index 000000000..e27a191fd
--- /dev/null
+++ b/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v6/workitemtracking/models.go
@@ -0,0 +1,1556 @@
+// --------------------------------------------------------------------------------------------
+// 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 workitemtracking
+
+import (
+ "github.com/google/uuid"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6"
+ "github.com/microsoft/azure-devops-go-api/azuredevops/v6/webapi"
+)
+
+type AccountMyWorkResult struct {
+ // True, when length of WorkItemDetails is same as the limit
+ QuerySizeLimitExceeded *bool `json:"querySizeLimitExceeded,omitempty"`
+ // WorkItem Details
+ WorkItemDetails *[]AccountWorkWorkItemModel `json:"workItemDetails,omitempty"`
+}
+
+// Represents Work Item Recent Activity
+type AccountRecentActivityWorkItemModel struct {
+ // Date of the last Activity by the user
+ ActivityDate *azuredevops.Time `json:"activityDate,omitempty"`
+ // Type of the activity
+ ActivityType *WorkItemRecentActivityType `json:"activityType,omitempty"`
+ // Last changed date of the work item
+ ChangedDate *azuredevops.Time `json:"changedDate,omitempty"`
+ // Work Item Id
+ Id *int `json:"id,omitempty"`
+ // TeamFoundationId of the user this activity belongs to
+ IdentityId *uuid.UUID `json:"identityId,omitempty"`
+ // State of the work item
+ State *string `json:"state,omitempty"`
+ // Team project the work item belongs to
+ TeamProject *string `json:"teamProject,omitempty"`
+ // Title of the work item
+ Title *string `json:"title,omitempty"`
+ // Type of Work Item
+ WorkItemType *string `json:"workItemType,omitempty"`
+ // Assigned To
+ AssignedTo *string `json:"assignedTo,omitempty"`
+}
+
+// Represents Work Item Recent Activity
+type AccountRecentActivityWorkItemModel2 struct {
+ // Date of the last Activity by the user
+ ActivityDate *azuredevops.Time `json:"activityDate,omitempty"`
+ // Type of the activity
+ ActivityType *WorkItemRecentActivityType `json:"activityType,omitempty"`
+ // Last changed date of the work item
+ ChangedDate *azuredevops.Time `json:"changedDate,omitempty"`
+ // Work Item Id
+ Id *int `json:"id,omitempty"`
+ // TeamFoundationId of the user this activity belongs to
+ IdentityId *uuid.UUID `json:"identityId,omitempty"`
+ // State of the work item
+ State *string `json:"state,omitempty"`
+ // Team project the work item belongs to
+ TeamProject *string `json:"teamProject,omitempty"`
+ // Title of the work item
+ Title *string `json:"title,omitempty"`
+ // Type of Work Item
+ WorkItemType *string `json:"workItemType,omitempty"`
+ // Assigned To
+ AssignedTo *webapi.IdentityRef `json:"assignedTo,omitempty"`
+}
+
+// Represents Work Item Recent Activity
+type AccountRecentActivityWorkItemModelBase struct {
+ // Date of the last Activity by the user
+ ActivityDate *azuredevops.Time `json:"activityDate,omitempty"`
+ // Type of the activity
+ ActivityType *WorkItemRecentActivityType `json:"activityType,omitempty"`
+ // Last changed date of the work item
+ ChangedDate *azuredevops.Time `json:"changedDate,omitempty"`
+ // Work Item Id
+ Id *int `json:"id,omitempty"`
+ // TeamFoundationId of the user this activity belongs to
+ IdentityId *uuid.UUID `json:"identityId,omitempty"`
+ // State of the work item
+ State *string `json:"state,omitempty"`
+ // Team project the work item belongs to
+ TeamProject *string `json:"teamProject,omitempty"`
+ // Title of the work item
+ Title *string `json:"title,omitempty"`
+ // Type of Work Item
+ WorkItemType *string `json:"workItemType,omitempty"`
+}
+
+// Represents Recent Mention Work Item
+type AccountRecentMentionWorkItemModel struct {
+ // Assigned To
+ AssignedTo *string `json:"assignedTo,omitempty"`
+ // Work Item Id
+ Id *int `json:"id,omitempty"`
+ // Latest date that the user were mentioned
+ MentionedDateField *azuredevops.Time `json:"mentionedDateField,omitempty"`
+ // State of the work item
+ State *string `json:"state,omitempty"`
+ // Team project the work item belongs to
+ TeamProject *string `json:"teamProject,omitempty"`
+ // Title of the work item
+ Title *string `json:"title,omitempty"`
+ // Type of Work Item
+ WorkItemType *string `json:"workItemType,omitempty"`
+}
+
+type AccountWorkWorkItemModel struct {
+ AssignedTo *string `json:"assignedTo,omitempty"`
+ ChangedDate *azuredevops.Time `json:"changedDate,omitempty"`
+ Id *int `json:"id,omitempty"`
+ State *string `json:"state,omitempty"`
+ TeamProject *string `json:"teamProject,omitempty"`
+ Title *string `json:"title,omitempty"`
+ WorkItemType *string `json:"workItemType,omitempty"`
+}
+
+// Contains criteria for querying work items based on artifact URI.
+type ArtifactUriQuery struct {
+ // List of artifact URIs to use for querying work items.
+ ArtifactUris *[]string `json:"artifactUris,omitempty"`
+}
+
+// Defines result of artifact URI query on work items. Contains mapping of work item IDs to artifact URI.
+type ArtifactUriQueryResult struct {
+ // A Dictionary that maps a list of work item references to the given list of artifact URI.
+ ArtifactUrisQueryResult *map[string][]WorkItemReference `json:"artifactUrisQueryResult,omitempty"`
+}
+
+type AttachmentReference struct {
+ Id *uuid.UUID `json:"id,omitempty"`
+ Url *string `json:"url,omitempty"`
+}
+
+// Flag to control error policy in a batch classification nodes get request.
+type ClassificationNodesErrorPolicy string
+
+type classificationNodesErrorPolicyValuesType struct {
+ Fail ClassificationNodesErrorPolicy
+ Omit ClassificationNodesErrorPolicy
+}
+
+var ClassificationNodesErrorPolicyValues = classificationNodesErrorPolicyValuesType{
+ Fail: "fail",
+ Omit: "omit",
+}
+
+// Comment on a Work Item.
+type Comment struct {
+ Url *string `json:"url,omitempty"`
+ // Link references to related REST resources.
+ Links interface{} `json:"_links,omitempty"`
+ // IdentityRef of the creator of the comment.
+ CreatedBy *webapi.IdentityRef `json:"createdBy,omitempty"`
+ // The creation date of the comment.
+ CreatedDate *azuredevops.Time `json:"createdDate,omitempty"`
+ // Effective Date/time value for adding the comment. Can be optionally different from CreatedDate.
+ CreatedOnBehalfDate *azuredevops.Time `json:"createdOnBehalfDate,omitempty"`
+ // Identity on whose behalf this comment has been added. Can be optionally different from CreatedBy.
+ CreatedOnBehalfOf *webapi.IdentityRef `json:"createdOnBehalfOf,omitempty"`
+ // The id assigned to the comment.
+ Id *int `json:"id,omitempty"`
+ // Indicates if the comment has been deleted.
+ IsDeleted *bool `json:"isDeleted,omitempty"`
+ // The mentions of the comment.
+ Mentions *[]CommentMention `json:"mentions,omitempty"`
+ // IdentityRef of the user who last modified the comment.
+ ModifiedBy *webapi.IdentityRef `json:"modifiedBy,omitempty"`
+ // The last modification date of the comment.
+ ModifiedDate *azuredevops.Time `json:"modifiedDate,omitempty"`
+ // The reactions of the comment.
+ Reactions *[]CommentReaction `json:"reactions,omitempty"`
+ // The text of the comment.
+ Text *string `json:"text,omitempty"`
+ // The current version of the comment.
+ Version *int `json:"version,omitempty"`
+ // The id of the work item this comment belongs to.
+ WorkItemId *int `json:"workItemId,omitempty"`
+}
+
+// Represents a request to create a work item comment.
+type CommentCreate struct {
+ // The text of the comment.
+ Text *string `json:"text,omitempty"`
+}
+
+// [Flags] Specifies the additional data retrieval options for work item comments.
+type CommentExpandOptions string
+
+type commentExpandOptionsValuesType struct {
+ None CommentExpandOptions
+ Reactions CommentExpandOptions
+ RenderedText CommentExpandOptions
+ RenderedTextOnly CommentExpandOptions
+ All CommentExpandOptions
+}
+
+var CommentExpandOptionsValues = commentExpandOptionsValuesType{
+ None: "none",
+ // Include comment reactions.
+ Reactions: "reactions",
+ // Include the rendered text (html) in addition to MD text.
+ RenderedText: "renderedText",
+ // If specified, then ONLY rendered text (html) will be returned, w/o markdown. Supposed to be used internally from data provides for optimization purposes.
+ RenderedTextOnly: "renderedTextOnly",
+ All: "all",
+}
+
+// Represents a list of work item comments.
+type CommentList struct {
+ Url *string `json:"url,omitempty"`
+ // Link references to related REST resources.
+ Links interface{} `json:"_links,omitempty"`
+ // List of comments in the current batch.
+ Comments *[]Comment `json:"comments,omitempty"`
+ // A string token that can be used to retrieving next page of comments if available. Otherwise null.
+ ContinuationToken *string `json:"continuationToken,omitempty"`
+ // The count of comments in the current batch.
+ Count *int `json:"count,omitempty"`
+ // Uri to the next page of comments if it is available. Otherwise null.
+ NextPage *string `json:"nextPage,omitempty"`
+ // Total count of comments on a work item.
+ TotalCount *int `json:"totalCount,omitempty"`
+}
+
+type CommentMention struct {
+ Url *string `json:"url,omitempty"`
+ // Link references to related REST resources.
+ Links interface{} `json:"_links,omitempty"`
+ // The artifact portion of the parsed text. (i.e. the work item's id)
+ ArtifactId *string `json:"artifactId,omitempty"`
+ // The type the parser assigned to the mention. (i.e. person, work item, etc)
+ ArtifactType *string `json:"artifactType,omitempty"`
+ // The comment id of the mention.
+ CommentId *int `json:"commentId,omitempty"`
+ // The resolved target of the mention. An example of this could be a user's tfid
+ TargetId *string `json:"targetId,omitempty"`
+}
+
+// Contains information about work item comment reaction for a particular reaction type.
+type CommentReaction struct {
+ Url *string `json:"url,omitempty"`
+ // Link references to related REST resources.
+ Links interface{} `json:"_links,omitempty"`
+ // The id of the comment this reaction belongs to.
+ CommentId *int `json:"commentId,omitempty"`
+ // Total number of reactions for the CommentReactionType.
+ Count *int `json:"count,omitempty"`
+ // Flag to indicate if the current user has engaged on this particular EngagementType (e.g. if they liked the associated comment).
+ IsCurrentUserEngaged *bool `json:"isCurrentUserEngaged,omitempty"`
+ // Type of the reaction.
+ Type *CommentReactionType `json:"type,omitempty"`
+}
+
+// Represents different reaction types for a work item comment.
+type CommentReactionType string
+
+type commentReactionTypeValuesType struct {
+ Like CommentReactionType
+ Dislike CommentReactionType
+ Heart CommentReactionType
+ Hooray CommentReactionType
+ Smile CommentReactionType
+ Confused CommentReactionType
+}
+
+var CommentReactionTypeValues = commentReactionTypeValuesType{
+ Like: "like",
+ Dislike: "dislike",
+ Heart: "heart",
+ Hooray: "hooray",
+ Smile: "smile",
+ Confused: "confused",
+}
+
+type CommentSortOrder string
+
+type commentSortOrderValuesType struct {
+ Asc CommentSortOrder
+ Desc CommentSortOrder
+}
+
+var CommentSortOrderValues = commentSortOrderValuesType{
+ // The results will be sorted in Ascending order.
+ Asc: "asc",
+ // The results will be sorted in Descending order.
+ Desc: "desc",
+}
+
+// Represents a request to update a work item comment.
+type CommentUpdate struct {
+ // The updated text of the comment.
+ Text *string `json:"text,omitempty"`
+}
+
+// Represents a specific version of a comment on a work item.
+type CommentVersion struct {
+ Url *string `json:"url,omitempty"`
+ // Link references to related REST resources.
+ Links interface{} `json:"_links,omitempty"`
+ // IdentityRef of the creator of the comment.
+ CreatedBy *webapi.IdentityRef `json:"createdBy,omitempty"`
+ // The creation date of the comment.
+ CreatedDate *azuredevops.Time `json:"createdDate,omitempty"`
+ // Effective Date/time value for adding the comment. Can be optionally different from CreatedDate.
+ CreatedOnBehalfDate *azuredevops.Time `json:"createdOnBehalfDate,omitempty"`
+ // Identity on whose behalf this comment has been added. Can be optionally different from CreatedBy.
+ CreatedOnBehalfOf *webapi.IdentityRef `json:"createdOnBehalfOf,omitempty"`
+ // The id assigned to the comment.
+ Id *int `json:"id,omitempty"`
+ // Indicates if the comment has been deleted at this version.
+ IsDeleted *bool `json:"isDeleted,omitempty"`
+ // IdentityRef of the user who modified the comment at this version.
+ ModifiedBy *webapi.IdentityRef `json:"modifiedBy,omitempty"`
+ // The modification date of the comment for this version.
+ ModifiedDate *azuredevops.Time `json:"modifiedDate,omitempty"`
+ // The rendered content of the comment at this version.
+ RenderedText *string `json:"renderedText,omitempty"`
+ // The text of the comment at this version.
+ Text *string `json:"text,omitempty"`
+ // The version number.
+ Version *int `json:"version,omitempty"`
+}
+
+type ExternalDeployment struct {
+ ArtifactId *uuid.UUID `json:"artifactId,omitempty"`
+ CreatedBy *uuid.UUID `json:"createdBy,omitempty"`
+ Description *string `json:"description,omitempty"`
+ DisplayName *string `json:"displayName,omitempty"`
+ Environment *ExternalEnvironment `json:"environment,omitempty"`
+ Group *string `json:"group,omitempty"`
+ Pipeline *ExternalPipeline `json:"pipeline,omitempty"`
+ RelatedWorkItemIds *[]int `json:"relatedWorkItemIds,omitempty"`
+ RunId *int `json:"runId,omitempty"`
+ SequenceNumber *int `json:"sequenceNumber,omitempty"`
+ Status *string `json:"status,omitempty"`
+ StatusDate *azuredevops.Time `json:"statusDate,omitempty"`
+ Url *string `json:"url,omitempty"`
+}
+
+type ExternalEnvironment struct {
+ DisplayName *string `json:"displayName,omitempty"`
+ Id *int `json:"id,omitempty"`
+ Type *string `json:"type,omitempty"`
+}
+
+type ExternalPipeline struct {
+ DisplayName *string `json:"displayName,omitempty"`
+ Id *int `json:"id,omitempty"`
+ Url *string `json:"url,omitempty"`
+}
+
+// Describes a list of dependent fields for a rule.
+type FieldDependentRule struct {
+ Url *string `json:"url,omitempty"`
+ // Link references to related REST resources.
+ Links interface{} `json:"_links,omitempty"`
+ // The dependent fields.
+ DependentFields *[]WorkItemFieldReference `json:"dependentFields,omitempty"`
+}
+
+// Enum for field types.
+type FieldType string
+
+type fieldTypeValuesType struct {
+ String FieldType
+ Integer FieldType
+ DateTime FieldType
+ PlainText FieldType
+ Html FieldType
+ TreePath FieldType
+ History FieldType
+ Double FieldType
+ Guid FieldType
+ Boolean FieldType
+ Identity FieldType
+ PicklistString FieldType
+ PicklistInteger FieldType
+ PicklistDouble FieldType
+}
+
+var FieldTypeValues = fieldTypeValuesType{
+ // String field type.
+ String: "string",
+ // Integer field type.
+ Integer: "integer",
+ // Datetime field type.
+ DateTime: "dateTime",
+ // Plain text field type.
+ PlainText: "plainText",
+ // HTML (Multiline) field type.
+ Html: "html",
+ // Treepath field type.
+ TreePath: "treePath",
+ // History field type.
+ History: "history",
+ // Double field type.
+ Double: "double",
+ // Guid field type.
+ Guid: "guid",
+ // Boolean field type.
+ Boolean: "boolean",
+ // Identity field type.
+ Identity: "identity",
+ // String picklist field type. When creating a string picklist field from REST API, use "String" FieldType.
+ PicklistString: "picklistString",
+ // Integer picklist field type. When creating a integer picklist field from REST API, use "Integer" FieldType.
+ PicklistInteger: "picklistInteger",
+ // Double picklist field type. When creating a double picklist field from REST API, use "Double" FieldType.
+ PicklistDouble: "picklistDouble",
+}
+
+// Enum for field usages.
+type FieldUsage string
+
+type fieldUsageValuesType struct {
+ None FieldUsage
+ WorkItem FieldUsage
+ WorkItemLink FieldUsage
+ Tree FieldUsage
+ WorkItemTypeExtension FieldUsage
+}
+
+var FieldUsageValues = fieldUsageValuesType{
+ // Empty usage.
+ None: "none",
+ // Work item field usage.
+ WorkItem: "workItem",
+ // Work item link field usage.
+ WorkItemLink: "workItemLink",
+ // Treenode field usage.
+ Tree: "tree",
+ // Work Item Type Extension usage.
+ WorkItemTypeExtension: "workItemTypeExtension",
+}
+
+// Flag to expand types of fields.
+type GetFieldsExpand string
+
+type getFieldsExpandValuesType struct {
+ None GetFieldsExpand
+ ExtensionFields GetFieldsExpand
+ IncludeDeleted GetFieldsExpand
+}
+
+var GetFieldsExpandValues = getFieldsExpandValuesType{
+ // Default behavior.
+ None: "none",
+ // Adds extension fields to the response.
+ ExtensionFields: "extensionFields",
+ // Includes fields that have been deleted.
+ IncludeDeleted: "includeDeleted",
+}
+
+// Describes a reference to an identity.
+type IdentityReference struct {
+ // This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject.
+ Links interface{} `json:"_links,omitempty"`
+ // The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations.
+ Descriptor *string `json:"descriptor,omitempty"`
+ // This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider.
+ DisplayName *string `json:"displayName,omitempty"`
+ // This url is the full route to the source resource of this graph subject.
+ Url *string `json:"url,omitempty"`
+ // Deprecated - Can be retrieved by querying the Graph user referenced in the "self" entry of the IdentityRef "_links" dictionary
+ DirectoryAlias *string `json:"directoryAlias,omitempty"`
+ // Deprecated - Available in the "avatar" entry of the IdentityRef "_links" dictionary
+ ImageUrl *string `json:"imageUrl,omitempty"`
+ // Deprecated - Can be retrieved by querying the Graph membership state referenced in the "membershipState" entry of the GraphUser "_links" dictionary
+ Inactive *bool `json:"inactive,omitempty"`
+ // Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsAadUserType/Descriptor.IsAadGroupType)
+ IsAadIdentity *bool `json:"isAadIdentity,omitempty"`
+ // Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsGroupType)
+ IsContainer *bool `json:"isContainer,omitempty"`
+ IsDeletedInOrigin *bool `json:"isDeletedInOrigin,omitempty"`
+ // Deprecated - not in use in most preexisting implementations of ToIdentityRef
+ ProfileUrl *string `json:"profileUrl,omitempty"`
+ // Deprecated - use Domain+PrincipalName instead
+ UniqueName *string `json:"uniqueName,omitempty"`
+ Id *uuid.UUID `json:"id,omitempty"`
+ // Legacy back-compat property. This has been the WIT specific value from Constants. Will be hidden (but exists) on the client unless they are targeting the newest version
+ Name *string `json:"name,omitempty"`
+}
+
+// Link description.
+type Link struct {
+ // Collection of link attributes.
+ Attributes *map[string]interface{} `json:"attributes,omitempty"`
+ // Relation type.
+ Rel *string `json:"rel,omitempty"`
+ // Link url.
+ Url *string `json:"url,omitempty"`
+}
+
+// The link query mode which determines the behavior of the query.
+type LinkQueryMode string
+
+type linkQueryModeValuesType struct {
+ WorkItems LinkQueryMode
+ LinksOneHopMustContain LinkQueryMode
+ LinksOneHopMayContain LinkQueryMode
+ LinksOneHopDoesNotContain LinkQueryMode
+ LinksRecursiveMustContain LinkQueryMode
+ LinksRecursiveMayContain LinkQueryMode
+ LinksRecursiveDoesNotContain LinkQueryMode
+}
+
+var LinkQueryModeValues = linkQueryModeValuesType{
+ // Returns flat list of work items.
+ WorkItems: "workItems",
+ // Returns work items where the source, target, and link criteria are all satisfied.
+ LinksOneHopMustContain: "linksOneHopMustContain",
+ // Returns work items that satisfy the source and link criteria, even if no linked work item satisfies the target criteria.
+ LinksOneHopMayContain: "linksOneHopMayContain",
+ // Returns work items that satisfy the source, only if no linked work item satisfies the link and target criteria.
+ LinksOneHopDoesNotContain: "linksOneHopDoesNotContain",
+ LinksRecursiveMustContain: "linksRecursiveMustContain",
+ // Returns work items a hierarchy of work items that by default satisfy the source
+ LinksRecursiveMayContain: "linksRecursiveMayContain",
+ LinksRecursiveDoesNotContain: "linksRecursiveDoesNotContain",
+}
+
+type LogicalOperation string
+
+type logicalOperationValuesType struct {
+ None LogicalOperation
+ And LogicalOperation
+ Or LogicalOperation
+}
+
+var LogicalOperationValues = logicalOperationValuesType{
+ None: "none",
+ And: "and",
+ Or: "or",
+}
+
+// Stores process ID.
+type ProcessIdModel struct {
+ // The ID of the process.
+ TypeId *uuid.UUID `json:"typeId,omitempty"`
+}
+
+// Stores project ID and its process ID.
+type ProcessMigrationResultModel struct {
+ // The ID of the process.
+ ProcessId *uuid.UUID `json:"processId,omitempty"`
+ // The ID of the project.
+ ProjectId *uuid.UUID `json:"projectId,omitempty"`
+}
+
+// Project work item type state colors
+type ProjectWorkItemStateColors struct {
+ // Project name
+ ProjectName *string `json:"projectName,omitempty"`
+ // State colors for all work item type in a project
+ WorkItemTypeStateColors *[]WorkItemTypeStateColors `json:"workItemTypeStateColors,omitempty"`
+}
+
+// Enumerates the possible provisioning actions that can be triggered on process template update.
+type ProvisioningActionType string
+
+type provisioningActionTypeValuesType struct {
+ Import ProvisioningActionType
+ Validate ProvisioningActionType
+}
+
+var ProvisioningActionTypeValues = provisioningActionTypeValuesType{
+ Import: "import",
+ Validate: "validate",
+}
+
+// Result of an update work item type XML update operation.
+type ProvisioningResult struct {
+ // Details about of the provisioning import events.
+ ProvisioningImportEvents *[]string `json:"provisioningImportEvents,omitempty"`
+}
+
+// Describes a request to get a list of queries
+type QueryBatchGetRequest struct {
+ // The expand parameters for queries. Possible options are { None, Wiql, Clauses, All, Minimal }
+ Expand *QueryExpand `json:"$expand,omitempty"`
+ // The flag to control error policy in a query batch request. Possible options are { Fail, Omit }.
+ ErrorPolicy *QueryErrorPolicy `json:"errorPolicy,omitempty"`
+ // The requested query ids
+ Ids *[]uuid.UUID `json:"ids,omitempty"`
+}
+
+// Enum to control error policy in a query batch request.
+type QueryErrorPolicy string
+
+type queryErrorPolicyValuesType struct {
+ Fail QueryErrorPolicy
+ Omit QueryErrorPolicy
+}
+
+var QueryErrorPolicyValues = queryErrorPolicyValuesType{
+ Fail: "fail",
+ Omit: "omit",
+}
+
+// Determines which set of additional query properties to display
+type QueryExpand string
+
+type queryExpandValuesType struct {
+ None QueryExpand
+ Wiql QueryExpand
+ Clauses QueryExpand
+ All QueryExpand
+ Minimal QueryExpand
+}
+
+var QueryExpandValues = queryExpandValuesType{
+ // Expands Columns, Links and ChangeInfo
+ None: "none",
+ // Expands Columns, Links, ChangeInfo and WIQL text
+ Wiql: "wiql",
+ // Expands Columns, Links, ChangeInfo, WIQL text and clauses
+ Clauses: "clauses",
+ // Expands all properties
+ All: "all",
+ // Displays minimal properties and the WIQL text
+ Minimal: "minimal",
+}
+
+// Represents an item in the work item query hierarchy. This can be either a query or a folder.
+type QueryHierarchyItem struct {
+ Url *string `json:"url,omitempty"`
+ // Link references to related REST resources.
+ Links interface{} `json:"_links,omitempty"`
+ // The child query items inside a query folder.
+ Children *[]QueryHierarchyItem `json:"children,omitempty"`
+ // The clauses for a flat query.
+ Clauses *WorkItemQueryClause `json:"clauses,omitempty"`
+ // The columns of the query.
+ Columns *[]WorkItemFieldReference `json:"columns,omitempty"`
+ // The identity who created the query item.
+ CreatedBy *IdentityReference `json:"createdBy,omitempty"`
+ // When the query item was created.
+ CreatedDate *azuredevops.Time `json:"createdDate,omitempty"`
+ // The link query mode.
+ FilterOptions *LinkQueryMode `json:"filterOptions,omitempty"`
+ // If this is a query folder, indicates if it contains any children.
+ HasChildren *bool `json:"hasChildren,omitempty"`
+ // The id of the query item.
+ Id *uuid.UUID `json:"id,omitempty"`
+ // Indicates if this query item is deleted. Setting this to false on a deleted query item will undelete it. Undeleting a query or folder will not bring back the permission changes that were previously applied to it.
+ IsDeleted *bool `json:"isDeleted,omitempty"`
+ // Indicates if this is a query folder or a query.
+ IsFolder *bool `json:"isFolder,omitempty"`
+ // Indicates if the WIQL of this query is invalid. This could be due to invalid syntax or a no longer valid area/iteration path.
+ IsInvalidSyntax *bool `json:"isInvalidSyntax,omitempty"`
+ // Indicates if this query item is public or private.
+ IsPublic *bool `json:"isPublic,omitempty"`
+ // The identity who last ran the query.
+ LastExecutedBy *IdentityReference `json:"lastExecutedBy,omitempty"`
+ // When the query was last run.
+ LastExecutedDate *azuredevops.Time `json:"lastExecutedDate,omitempty"`
+ // The identity who last modified the query item.
+ LastModifiedBy *IdentityReference `json:"lastModifiedBy,omitempty"`
+ // When the query item was last modified.
+ LastModifiedDate *azuredevops.Time `json:"lastModifiedDate,omitempty"`
+ // The link query clause.
+ LinkClauses *WorkItemQueryClause `json:"linkClauses,omitempty"`
+ // The name of the query item.
+ Name *string `json:"name,omitempty"`
+ // The path of the query item.
+ Path *string `json:"path,omitempty"`
+ // The recursion option for use in a tree query.
+ QueryRecursionOption *QueryRecursionOption `json:"queryRecursionOption,omitempty"`
+ // The type of query.
+ QueryType *QueryType `json:"queryType,omitempty"`
+ // The sort columns of the query.
+ SortColumns *[]WorkItemQuerySortColumn `json:"sortColumns,omitempty"`
+ // The source clauses in a tree or one-hop link query.
+ SourceClauses *WorkItemQueryClause `json:"sourceClauses,omitempty"`
+ // The target clauses in a tree or one-hop link query.
+ TargetClauses *WorkItemQueryClause `json:"targetClauses,omitempty"`
+ // The WIQL text of the query
+ Wiql *string `json:"wiql,omitempty"`
+}
+
+type QueryHierarchyItemsResult struct {
+ // The count of items.
+ Count *int `json:"count,omitempty"`
+ // Indicates if the max return limit was hit but there are still more items
+ HasMore *bool `json:"hasMore,omitempty"`
+ // The list of items
+ Value *[]QueryHierarchyItem `json:"value,omitempty"`
+}
+
+type QueryOption string
+
+type queryOptionValuesType struct {
+ Doing QueryOption
+ Done QueryOption
+ Followed QueryOption
+}
+
+var QueryOptionValues = queryOptionValuesType{
+ Doing: "doing",
+ Done: "done",
+ Followed: "followed",
+}
+
+// Determines whether a tree query matches parents or children first.
+type QueryRecursionOption string
+
+type queryRecursionOptionValuesType struct {
+ ParentFirst QueryRecursionOption
+ ChildFirst QueryRecursionOption
+}
+
+var QueryRecursionOptionValues = queryRecursionOptionValuesType{
+ // Returns work items that satisfy the source, even if no linked work item satisfies the target and link criteria.
+ ParentFirst: "parentFirst",
+ // Returns work items that satisfy the target criteria, even if no work item satisfies the source and link criteria.
+ ChildFirst: "childFirst",
+}
+
+// The query result type
+type QueryResultType string
+
+type queryResultTypeValuesType struct {
+ WorkItem QueryResultType
+ WorkItemLink QueryResultType
+}
+
+var QueryResultTypeValues = queryResultTypeValuesType{
+ // A list of work items (for flat queries).
+ WorkItem: "workItem",
+ // A list of work item links (for OneHop and Tree queries).
+ WorkItemLink: "workItemLink",
+}
+
+// The type of query.
+type QueryType string
+
+type queryTypeValuesType struct {
+ Flat QueryType
+ Tree QueryType
+ OneHop QueryType
+}
+
+var QueryTypeValues = queryTypeValuesType{
+ // Gets a flat list of work items.
+ Flat: "flat",
+ // Gets a tree of work items showing their link hierarchy.
+ Tree: "tree",
+ // Gets a list of work items and their direct links.
+ OneHop: "oneHop",
+}
+
+// The reporting revision expand level.
+type ReportingRevisionsExpand string
+
+type reportingRevisionsExpandValuesType struct {
+ None ReportingRevisionsExpand
+ Fields ReportingRevisionsExpand
+}
+
+var ReportingRevisionsExpandValues = reportingRevisionsExpandValuesType{
+ // Default behavior.
+ None: "none",
+ // Add fields to the response.
+ Fields: "fields",
+}
+
+type ReportingWorkItemLinksBatch struct {
+ // ContinuationToken acts as a waterMark. Used while querying large results.
+ ContinuationToken *string `json:"continuationToken,omitempty"`
+ // Returns 'true' if it's last batch, 'false' otherwise.
+ IsLastBatch *bool `json:"isLastBatch,omitempty"`
+ // The next link for the work item.
+ NextLink *string `json:"nextLink,omitempty"`
+ // Values such as rel, sourceId, TargetId, ChangedDate, isActive.
+ Values *[]interface{} `json:"values,omitempty"`
+}
+
+type ReportingWorkItemRevisionsBatch struct {
+ // ContinuationToken acts as a waterMark. Used while querying large results.
+ ContinuationToken *string `json:"continuationToken,omitempty"`
+ // Returns 'true' if it's last batch, 'false' otherwise.
+ IsLastBatch *bool `json:"isLastBatch,omitempty"`
+ // The next link for the work item.
+ NextLink *string `json:"nextLink,omitempty"`
+ // Values such as rel, sourceId, TargetId, ChangedDate, isActive.
+ Values *[]interface{} `json:"values,omitempty"`
+}
+
+// The class represents the reporting work item revision filer.
+type ReportingWorkItemRevisionsFilter struct {
+ // A list of fields to return in work item revisions. Omit this parameter to get all reportable fields.
+ Fields *[]string `json:"fields,omitempty"`
+ // Include deleted work item in the result.
+ IncludeDeleted *bool `json:"includeDeleted,omitempty"`
+ // Return an identity reference instead of a string value for identity fields.
+ IncludeIdentityRef *bool `json:"includeIdentityRef,omitempty"`
+ // Include only the latest version of a work item, skipping over all previous revisions of the work item.
+ IncludeLatestOnly *bool `json:"includeLatestOnly,omitempty"`
+ // Include tag reference instead of string value for System.Tags field
+ IncludeTagRef *bool `json:"includeTagRef,omitempty"`
+ // A list of types to filter the results to specific work item types. Omit this parameter to get work item revisions of all work item types.
+ Types *[]string `json:"types,omitempty"`
+}
+
+// The class describes reporting work item revision batch.
+type StreamedBatch struct {
+ // ContinuationToken acts as a waterMark. Used while querying large results.
+ ContinuationToken *string `json:"continuationToken,omitempty"`
+ // Returns 'true' if it's last batch, 'false' otherwise.
+ IsLastBatch *bool `json:"isLastBatch,omitempty"`
+ // The next link for the work item.
+ NextLink *string `json:"nextLink,omitempty"`
+ // Values such as rel, sourceId, TargetId, ChangedDate, isActive.
+ Values *[]interface{} `json:"values,omitempty"`
+}
+
+// Enumerates types of supported xml templates used for customization.
+type TemplateType string
+
+type templateTypeValuesType struct {
+ WorkItemType TemplateType
+ GlobalWorkflow TemplateType
+}
+
+var TemplateTypeValues = templateTypeValuesType{
+ WorkItemType: "workItemType",
+ GlobalWorkflow: "globalWorkflow",
+}
+
+// Types of tree node structures.
+type TreeNodeStructureType string
+
+type treeNodeStructureTypeValuesType struct {
+ Area TreeNodeStructureType
+ Iteration TreeNodeStructureType
+}
+
+var TreeNodeStructureTypeValues = treeNodeStructureTypeValuesType{
+ // Area type.
+ Area: "area",
+ // Iteration type.
+ Iteration: "iteration",
+}
+
+// Types of tree structures groups.
+type TreeStructureGroup string
+
+type treeStructureGroupValuesType struct {
+ Areas TreeStructureGroup
+ Iterations TreeStructureGroup
+}
+
+var TreeStructureGroupValues = treeStructureGroupValuesType{
+ Areas: "areas",
+ Iterations: "iterations",
+}
+
+// Describes an update request for a work item field.
+type UpdateWorkItemField struct {
+ // Indicates whether the user wants to restore the field.
+ IsDeleted *bool `json:"isDeleted,omitempty"`
+}
+
+// A WIQL query
+type Wiql struct {
+ // The text of the WIQL query
+ Query *string `json:"query,omitempty"`
+}
+
+// A work artifact link describes an outbound artifact link type.
+type WorkArtifactLink struct {
+ // Target artifact type.
+ ArtifactType *string `json:"artifactType,omitempty"`
+ // Outbound link type.
+ LinkType *string `json:"linkType,omitempty"`
+ // Target tool type.
+ ToolType *string `json:"toolType,omitempty"`
+}
+
+// Describes a work item.
+type WorkItem struct {
+ Url *string `json:"url,omitempty"`
+ // Link references to related REST resources.
+ Links interface{} `json:"_links,omitempty"`
+ // Reference to a specific version of the comment added/edited/deleted in this revision.
+ CommentVersionRef *WorkItemCommentVersionRef `json:"commentVersionRef,omitempty"`
+ // Map of field and values for the work item.
+ Fields *map[string]interface{} `json:"fields,omitempty"`
+ // The work item ID.
+ Id *int `json:"id,omitempty"`
+ // Relations of the work item.
+ Relations *[]WorkItemRelation `json:"relations,omitempty"`
+ // Revision number of the work item.
+ Rev *int `json:"rev,omitempty"`
+}
+
+// Describes a request to get a set of work items
+type WorkItemBatchGetRequest struct {
+ // The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }
+ Expand *WorkItemExpand `json:"$expand,omitempty"`
+ // AsOf UTC date time string
+ AsOf *azuredevops.Time `json:"asOf,omitempty"`
+ // The flag to control error policy in a bulk get work items request. Possible options are {Fail, Omit}.
+ ErrorPolicy *WorkItemErrorPolicy `json:"errorPolicy,omitempty"`
+ // The requested fields
+ Fields *[]string `json:"fields,omitempty"`
+ // The requested work item ids
+ Ids *[]int `json:"ids,omitempty"`
+}
+
+// Defines a classification node for work item tracking.
+type WorkItemClassificationNode struct {
+ Url *string `json:"url,omitempty"`
+ // Link references to related REST resources.
+ Links interface{} `json:"_links,omitempty"`
+ // Dictionary that has node attributes like start/finish date for iteration nodes.
+ Attributes *map[string]interface{} `json:"attributes,omitempty"`
+ // List of child nodes fetched.
+ Children *[]WorkItemClassificationNode `json:"children,omitempty"`
+ // Flag that indicates if the classification node has any child nodes.
+ HasChildren *bool `json:"hasChildren,omitempty"`
+ // Integer ID of the classification node.
+ Id *int `json:"id,omitempty"`
+ // GUID ID of the classification node.
+ Identifier *uuid.UUID `json:"identifier,omitempty"`
+ // Name of the classification node.
+ Name *string `json:"name,omitempty"`
+ // Path of the classification node.
+ Path *string `json:"path,omitempty"`
+ // Node structure type.
+ StructureType *TreeNodeStructureType `json:"structureType,omitempty"`
+}
+
+// Comment on Work Item
+type WorkItemComment struct {
+ Url *string `json:"url,omitempty"`
+ // Link references to related REST resources.
+ Links interface{} `json:"_links,omitempty"`
+ // Identity of user who added the comment.
+ RevisedBy *IdentityReference `json:"revisedBy,omitempty"`
+ // The date of comment.
+ RevisedDate *azuredevops.Time `json:"revisedDate,omitempty"`
+ // The work item revision number.
+ Revision *int `json:"revision,omitempty"`
+ // The text of the comment.
+ Text *string `json:"text,omitempty"`
+}
+
+// Collection of comments.
+type WorkItemComments struct {
+ Url *string `json:"url,omitempty"`
+ // Link references to related REST resources.
+ Links interface{} `json:"_links,omitempty"`
+ // Comments collection.
+ Comments *[]WorkItemComment `json:"comments,omitempty"`
+ // The count of comments.
+ Count *int `json:"count,omitempty"`
+ // Count of comments from the revision.
+ FromRevisionCount *int `json:"fromRevisionCount,omitempty"`
+ // Total count of comments.
+ TotalCount *int `json:"totalCount,omitempty"`
+}
+
+// Represents the reference to a specific version of a comment on a Work Item.
+type WorkItemCommentVersionRef struct {
+ Url *string `json:"url,omitempty"`
+ // The id assigned to the comment.
+ CommentId *int `json:"commentId,omitempty"`
+ // [Internal] The work item revision where this comment was originally added.
+ CreatedInRevision *int `json:"createdInRevision,omitempty"`
+ // [Internal] Specifies whether comment was deleted.
+ IsDeleted *bool `json:"isDeleted,omitempty"`
+ // [Internal] The text of the comment.
+ Text *string `json:"text,omitempty"`
+ // The version number.
+ Version *int `json:"version,omitempty"`
+}
+
+// Full deleted work item object. Includes the work item itself.
+type WorkItemDelete struct {
+ // The HTTP status code for work item operation in a batch request.
+ Code *int `json:"code,omitempty"`
+ // The user who deleted the work item type.
+ DeletedBy *string `json:"deletedBy,omitempty"`
+ // The work item deletion date.
+ DeletedDate *string `json:"deletedDate,omitempty"`
+ // Work item ID.
+ Id *int `json:"id,omitempty"`
+ // The exception message for work item operation in a batch request.
+ Message *string `json:"message,omitempty"`
+ // Name or title of the work item.
+ Name *string `json:"name,omitempty"`
+ // Parent project of the deleted work item.
+ Project *string `json:"project,omitempty"`
+ // Type of work item.
+ Type *string `json:"type,omitempty"`
+ // REST API URL of the resource
+ Url *string `json:"url,omitempty"`
+ // The work item object that was deleted.
+ Resource *WorkItem `json:"resource,omitempty"`
+}
+
+// Reference to a deleted work item.
+type WorkItemDeleteReference struct {
+ // The HTTP status code for work item operation in a batch request.
+ Code *int `json:"code,omitempty"`
+ // The user who deleted the work item type.
+ DeletedBy *string `json:"deletedBy,omitempty"`
+ // The work item deletion date.
+ DeletedDate *string `json:"deletedDate,omitempty"`
+ // Work item ID.
+ Id *int `json:"id,omitempty"`
+ // The exception message for work item operation in a batch request.
+ Message *string `json:"message,omitempty"`
+ // Name or title of the work item.
+ Name *string `json:"name,omitempty"`
+ // Parent project of the deleted work item.
+ Project *string `json:"project,omitempty"`
+ // Type of work item.
+ Type *string `json:"type,omitempty"`
+ // REST API URL of the resource
+ Url *string `json:"url,omitempty"`
+}
+
+// Shallow Reference to a deleted work item.
+type WorkItemDeleteShallowReference struct {
+ // Work item ID.
+ Id *int `json:"id,omitempty"`
+ // REST API URL of the resource
+ Url *string `json:"url,omitempty"`
+}
+
+// Describes an update request for a deleted work item.
+type WorkItemDeleteUpdate struct {
+ // Sets a value indicating whether this work item is deleted.
+ IsDeleted *bool `json:"isDeleted,omitempty"`
+}
+
+// Enum to control error policy in a bulk get work items request.
+type WorkItemErrorPolicy string
+
+type workItemErrorPolicyValuesType struct {
+ Fail WorkItemErrorPolicy
+ Omit WorkItemErrorPolicy
+}
+
+var WorkItemErrorPolicyValues = workItemErrorPolicyValuesType{
+ // Fail work error policy.
+ Fail: "fail",
+ // Omit work error policy.
+ Omit: "omit",
+}
+
+// Flag to control payload properties from get work item command.
+type WorkItemExpand string
+
+type workItemExpandValuesType struct {
+ None WorkItemExpand
+ Relations WorkItemExpand
+ Fields WorkItemExpand
+ Links WorkItemExpand
+ All WorkItemExpand
+}
+
+var WorkItemExpandValues = workItemExpandValuesType{
+ // Default behavior.
+ None: "none",
+ // Relations work item expand.
+ Relations: "relations",
+ // Fields work item expand.
+ Fields: "fields",
+ // Links work item expand.
+ Links: "links",
+ // Expands all.
+ All: "all",
+}
+
+// Describes a field on a work item and it's properties specific to that work item type.
+type WorkItemField struct {
+ Url *string `json:"url,omitempty"`
+ // Link references to related REST resources.
+ Links interface{} `json:"_links,omitempty"`
+ // Indicates whether the field is sortable in server queries.
+ CanSortBy *bool `json:"canSortBy,omitempty"`
+ // The description of the field.
+ Description *string `json:"description,omitempty"`
+ // Indicates whether this field is deleted.
+ IsDeleted *bool `json:"isDeleted,omitempty"`
+ // Indicates whether this field is an identity field.
+ IsIdentity *bool `json:"isIdentity,omitempty"`
+ // Indicates whether this instance is picklist.
+ IsPicklist *bool `json:"isPicklist,omitempty"`
+ // Indicates whether this instance is a suggested picklist .
+ IsPicklistSuggested *bool `json:"isPicklistSuggested,omitempty"`
+ // Indicates whether the field can be queried in the server.
+ IsQueryable *bool `json:"isQueryable,omitempty"`
+ // The name of the field.
+ Name *string `json:"name,omitempty"`
+ // If this field is picklist, the identifier of the picklist associated, otherwise null
+ PicklistId *uuid.UUID `json:"picklistId,omitempty"`
+ // Indicates whether the field is [read only].
+ ReadOnly *bool `json:"readOnly,omitempty"`
+ // The reference name of the field.
+ ReferenceName *string `json:"referenceName,omitempty"`
+ // The supported operations on this field.
+ SupportedOperations *[]WorkItemFieldOperation `json:"supportedOperations,omitempty"`
+ // The type of the field.
+ Type *FieldType `json:"type,omitempty"`
+ // The usage of the field.
+ Usage *FieldUsage `json:"usage,omitempty"`
+}
+
+// Describes a work item field operation.
+type WorkItemFieldOperation struct {
+ // Friendly name of the operation.
+ Name *string `json:"name,omitempty"`
+ // Reference name of the operation.
+ ReferenceName *string `json:"referenceName,omitempty"`
+}
+
+// Reference to a field in a work item
+type WorkItemFieldReference struct {
+ // The friendly name of the field.
+ Name *string `json:"name,omitempty"`
+ // The reference name of the field.
+ ReferenceName *string `json:"referenceName,omitempty"`
+ // The REST URL of the resource.
+ Url *string `json:"url,omitempty"`
+}
+
+// Describes an update to a work item field.
+type WorkItemFieldUpdate struct {
+ // The new value of the field.
+ NewValue interface{} `json:"newValue,omitempty"`
+ // The old value of the field.
+ OldValue interface{} `json:"oldValue,omitempty"`
+}
+
+type WorkItemHistory struct {
+ Url *string `json:"url,omitempty"`
+ // Link references to related REST resources.
+ Links interface{} `json:"_links,omitempty"`
+ Rev *int `json:"rev,omitempty"`
+ RevisedBy *IdentityReference `json:"revisedBy,omitempty"`
+ RevisedDate *azuredevops.Time `json:"revisedDate,omitempty"`
+ Value *string `json:"value,omitempty"`
+}
+
+// Reference to a work item icon.
+type WorkItemIcon struct {
+ // The identifier of the icon.
+ Id *string `json:"id,omitempty"`
+ // The REST URL of the resource.
+ Url *string `json:"url,omitempty"`
+}
+
+// A link between two work items.
+type WorkItemLink struct {
+ // The type of link.
+ Rel *string `json:"rel,omitempty"`
+ // The source work item.
+ Source *WorkItemReference `json:"source,omitempty"`
+ // The target work item.
+ Target *WorkItemReference `json:"target,omitempty"`
+}
+
+// Describes the next state for a work item.
+type WorkItemNextStateOnTransition struct {
+ // Error code if there is no next state transition possible.
+ ErrorCode *string `json:"errorCode,omitempty"`
+ // Work item ID.
+ Id *int `json:"id,omitempty"`
+ // Error message if there is no next state transition possible.
+ Message *string `json:"message,omitempty"`
+ // Name of the next state on transition.
+ StateOnTransition *string `json:"stateOnTransition,omitempty"`
+}
+
+// Represents a clause in a work item query. This shows the structure of a work item query.
+type WorkItemQueryClause struct {
+ // Child clauses if the current clause is a logical operator
+ Clauses *[]WorkItemQueryClause `json:"clauses,omitempty"`
+ // Field associated with condition
+ Field *WorkItemFieldReference `json:"field,omitempty"`
+ // Right side of the condition when a field to field comparison
+ FieldValue *WorkItemFieldReference `json:"fieldValue,omitempty"`
+ // Determines if this is a field to field comparison
+ IsFieldValue *bool `json:"isFieldValue,omitempty"`
+ // Logical operator separating the condition clause
+ LogicalOperator *LogicalOperation `json:"logicalOperator,omitempty"`
+ // The field operator
+ Operator *WorkItemFieldOperation `json:"operator,omitempty"`
+ // Right side of the condition when a field to value comparison
+ Value *string `json:"value,omitempty"`
+}
+
+// The result of a work item query.
+type WorkItemQueryResult struct {
+ // The date the query was run in the context of.
+ AsOf *azuredevops.Time `json:"asOf,omitempty"`
+ // The columns of the query.
+ Columns *[]WorkItemFieldReference `json:"columns,omitempty"`
+ // The result type
+ QueryResultType *QueryResultType `json:"queryResultType,omitempty"`
+ // The type of the query
+ QueryType *QueryType `json:"queryType,omitempty"`
+ // The sort columns of the query.
+ SortColumns *[]WorkItemQuerySortColumn `json:"sortColumns,omitempty"`
+ // The work item links returned by the query.
+ WorkItemRelations *[]WorkItemLink `json:"workItemRelations,omitempty"`
+ // The work items returned by the query.
+ WorkItems *[]WorkItemReference `json:"workItems,omitempty"`
+}
+
+// A sort column.
+type WorkItemQuerySortColumn struct {
+ // The direction to sort by.
+ Descending *bool `json:"descending,omitempty"`
+ // A work item field.
+ Field *WorkItemFieldReference `json:"field,omitempty"`
+}
+
+// Type of the activity
+type WorkItemRecentActivityType string
+
+type workItemRecentActivityTypeValuesType struct {
+ Visited WorkItemRecentActivityType
+ Edited WorkItemRecentActivityType
+ Deleted WorkItemRecentActivityType
+ Restored WorkItemRecentActivityType
+}
+
+var WorkItemRecentActivityTypeValues = workItemRecentActivityTypeValuesType{
+ Visited: "visited",
+ Edited: "edited",
+ Deleted: "deleted",
+ Restored: "restored",
+}
+
+// Contains reference to a work item.
+type WorkItemReference struct {
+ // Work item ID.
+ Id *int `json:"id,omitempty"`
+ // REST API URL of the resource
+ Url *string `json:"url,omitempty"`
+}
+
+type WorkItemRelation struct {
+ // Collection of link attributes.
+ Attributes *map[string]interface{} `json:"attributes,omitempty"`
+ // Relation type.
+ Rel *string `json:"rel,omitempty"`
+ // Link url.
+ Url *string `json:"url,omitempty"`
+}
+
+// Represents the work item type relation type.
+type WorkItemRelationType struct {
+ Url *string `json:"url,omitempty"`
+ // Link references to related REST resources.
+ Links interface{} `json:"_links,omitempty"`
+ // The name.
+ Name *string `json:"name,omitempty"`
+ // The reference name.
+ ReferenceName *string `json:"referenceName,omitempty"`
+ // The collection of relation type attributes.
+ Attributes *map[string]interface{} `json:"attributes,omitempty"`
+}
+
+// Describes updates to a work item's relations.
+type WorkItemRelationUpdates struct {
+ // List of newly added relations.
+ Added *[]WorkItemRelation `json:"added,omitempty"`
+ // List of removed relations.
+ Removed *[]WorkItemRelation `json:"removed,omitempty"`
+ // List of updated relations.
+ Updated *[]WorkItemRelation `json:"updated,omitempty"`
+}
+
+// Work item type state name, color and state category
+type WorkItemStateColor struct {
+ // Category of state
+ Category *string `json:"category,omitempty"`
+ // Color value
+ Color *string `json:"color,omitempty"`
+ // Work item type state name
+ Name *string `json:"name,omitempty"`
+}
+
+// Describes a state transition in a work item.
+type WorkItemStateTransition struct {
+ // Gets a list of actions needed to transition to that state.
+ Actions *[]string `json:"actions,omitempty"`
+ // Name of the next state.
+ To *string `json:"to,omitempty"`
+}
+
+type WorkItemTagDefinition struct {
+ Id *uuid.UUID `json:"id,omitempty"`
+ Name *string `json:"name,omitempty"`
+ Url *string `json:"url,omitempty"`
+}
+
+// Describes a work item template.
+type WorkItemTemplate struct {
+ Url *string `json:"url,omitempty"`
+ // Link references to related REST resources.
+ Links interface{} `json:"_links,omitempty"`
+ // The description of the work item template.
+ Description *string `json:"description,omitempty"`
+ // The identifier of the work item template.
+ Id *uuid.UUID `json:"id,omitempty"`
+ // The name of the work item template.
+ Name *string `json:"name,omitempty"`
+ // The name of the work item type.
+ WorkItemTypeName *string `json:"workItemTypeName,omitempty"`
+ // Mapping of field and its templated value.
+ Fields *map[string]string `json:"fields,omitempty"`
+}
+
+// Describes a shallow reference to a work item template.
+type WorkItemTemplateReference struct {
+ Url *string `json:"url,omitempty"`
+ // Link references to related REST resources.
+ Links interface{} `json:"_links,omitempty"`
+ // The description of the work item template.
+ Description *string `json:"description,omitempty"`
+ // The identifier of the work item template.
+ Id *uuid.UUID `json:"id,omitempty"`
+ // The name of the work item template.
+ Name *string `json:"name,omitempty"`
+ // The name of the work item type.
+ WorkItemTypeName *string `json:"workItemTypeName,omitempty"`
+}
+
+type WorkItemTrackingReference struct {
+ Url *string `json:"url,omitempty"`
+ // Link references to related REST resources.
+ Links interface{} `json:"_links,omitempty"`
+ // The name.
+ Name *string `json:"name,omitempty"`
+ // The reference name.
+ ReferenceName *string `json:"referenceName,omitempty"`
+}
+
+// Base class for WIT REST resources.
+type WorkItemTrackingResource struct {
+ Url *string `json:"url,omitempty"`
+ // Link references to related REST resources.
+ Links interface{} `json:"_links,omitempty"`
+}
+
+// Base class for work item tracking resource references.
+type WorkItemTrackingResourceReference struct {
+ Url *string `json:"url,omitempty"`
+}
+
+// Describes a work item type.
+type WorkItemType struct {
+ Url *string `json:"url,omitempty"`
+ // Link references to related REST resources.
+ Links interface{} `json:"_links,omitempty"`
+ // The color.
+ Color *string `json:"color,omitempty"`
+ // The description of the work item type.
+ Description *string `json:"description,omitempty"`
+ // The fields that exist on the work item type.
+ FieldInstances *[]WorkItemTypeFieldInstance `json:"fieldInstances,omitempty"`
+ // The fields that exist on the work item type.
+ Fields *[]WorkItemTypeFieldInstance `json:"fields,omitempty"`
+ // The icon of the work item type.
+ Icon *WorkItemIcon `json:"icon,omitempty"`
+ // True if work item type is disabled
+ IsDisabled *bool `json:"isDisabled,omitempty"`
+ // Gets the name of the work item type.
+ Name *string `json:"name,omitempty"`
+ // The reference name of the work item type.
+ ReferenceName *string `json:"referenceName,omitempty"`
+ // Gets state information for the work item type.
+ States *[]WorkItemStateColor `json:"states,omitempty"`
+ // Gets the various state transition mappings in the work item type.
+ Transitions *map[string][]WorkItemStateTransition `json:"transitions,omitempty"`
+ // The XML form.
+ XmlForm *string `json:"xmlForm,omitempty"`
+}
+
+// Describes a work item type category.
+type WorkItemTypeCategory struct {
+ Url *string `json:"url,omitempty"`
+ // Link references to related REST resources.
+ Links interface{} `json:"_links,omitempty"`
+ // Gets or sets the default type of the work item.
+ DefaultWorkItemType *WorkItemTypeReference `json:"defaultWorkItemType,omitempty"`
+ // The name of the category.
+ Name *string `json:"name,omitempty"`
+ // The reference name of the category.
+ ReferenceName *string `json:"referenceName,omitempty"`
+ // The work item types that belong to the category.
+ WorkItemTypes *[]WorkItemTypeReference `json:"workItemTypes,omitempty"`
+}
+
+// Describes a work item type's colors.
+type WorkItemTypeColor struct {
+ // Gets or sets the color of the primary.
+ PrimaryColor *string `json:"primaryColor,omitempty"`
+ // Gets or sets the color of the secondary.
+ SecondaryColor *string `json:"secondaryColor,omitempty"`
+ // The name of the work item type.
+ WorkItemTypeName *string `json:"workItemTypeName,omitempty"`
+}
+
+// Describes work item type nam, its icon and color.
+type WorkItemTypeColorAndIcon struct {
+ // The color of the work item type in hex format.
+ Color *string `json:"color,omitempty"`
+ // The work item type icon.
+ Icon *string `json:"icon,omitempty"`
+ // The name of the work item type.
+ WorkItemTypeName *string `json:"workItemTypeName,omitempty"`
+}
+
+// Field instance of a work item type.
+type WorkItemTypeFieldInstance struct {
+ // The friendly name of the field.
+ Name *string `json:"name,omitempty"`
+ // The reference name of the field.
+ ReferenceName *string `json:"referenceName,omitempty"`
+ // The REST URL of the resource.
+ Url *string `json:"url,omitempty"`
+ // Indicates whether field value is always required.
+ AlwaysRequired *bool `json:"alwaysRequired,omitempty"`
+ // The list of dependent fields.
+ DependentFields *[]WorkItemFieldReference `json:"dependentFields,omitempty"`
+ // Gets the help text for the field.
+ HelpText *string `json:"helpText,omitempty"`
+ // The list of field allowed values.
+ AllowedValues *[]string `json:"allowedValues,omitempty"`
+ // Represents the default value of the field.
+ DefaultValue *string `json:"defaultValue,omitempty"`
+}
+
+// Base field instance for workItemType fields.
+type WorkItemTypeFieldInstanceBase struct {
+ // The friendly name of the field.
+ Name *string `json:"name,omitempty"`
+ // The reference name of the field.
+ ReferenceName *string `json:"referenceName,omitempty"`
+ // The REST URL of the resource.
+ Url *string `json:"url,omitempty"`
+ // Indicates whether field value is always required.
+ AlwaysRequired *bool `json:"alwaysRequired,omitempty"`
+ // The list of dependent fields.
+ DependentFields *[]WorkItemFieldReference `json:"dependentFields,omitempty"`
+ // Gets the help text for the field.
+ HelpText *string `json:"helpText,omitempty"`
+}
+
+// Expand options for the work item field(s) request.
+type WorkItemTypeFieldsExpandLevel string
+
+type workItemTypeFieldsExpandLevelValuesType struct {
+ None WorkItemTypeFieldsExpandLevel
+ AllowedValues WorkItemTypeFieldsExpandLevel
+ DependentFields WorkItemTypeFieldsExpandLevel
+ All WorkItemTypeFieldsExpandLevel
+}
+
+var WorkItemTypeFieldsExpandLevelValues = workItemTypeFieldsExpandLevelValuesType{
+ // Includes only basic properties of the field.
+ None: "none",
+ // Includes allowed values for the field.
+ AllowedValues: "allowedValues",
+ // Includes dependent fields of the field.
+ DependentFields: "dependentFields",
+ // Includes allowed values and dependent fields of the field.
+ All: "all",
+}
+
+// Field Instance of a workItemype with detailed references.
+type WorkItemTypeFieldWithReferences struct {
+ // The friendly name of the field.
+ Name *string `json:"name,omitempty"`
+ // The reference name of the field.
+ ReferenceName *string `json:"referenceName,omitempty"`
+ // The REST URL of the resource.
+ Url *string `json:"url,omitempty"`
+ // Indicates whether field value is always required.
+ AlwaysRequired *bool `json:"alwaysRequired,omitempty"`
+ // The list of dependent fields.
+ DependentFields *[]WorkItemFieldReference `json:"dependentFields,omitempty"`
+ // Gets the help text for the field.
+ HelpText *string `json:"helpText,omitempty"`
+ // The list of field allowed values.
+ AllowedValues *[]interface{} `json:"allowedValues,omitempty"`
+ // Represents the default value of the field.
+ DefaultValue interface{} `json:"defaultValue,omitempty"`
+}
+
+// Reference to a work item type.
+type WorkItemTypeReference struct {
+ Url *string `json:"url,omitempty"`
+ // Name of the work item type.
+ Name *string `json:"name,omitempty"`
+}
+
+// State colors for a work item type
+type WorkItemTypeStateColors struct {
+ // Work item type state colors
+ StateColors *[]WorkItemStateColor `json:"stateColors,omitempty"`
+ // Work item type name
+ WorkItemTypeName *string `json:"workItemTypeName,omitempty"`
+}
+
+// Describes a work item type template.
+type WorkItemTypeTemplate struct {
+ // XML template in string format.
+ Template *string `json:"template,omitempty"`
+}
+
+// Describes a update work item type template request body.
+type WorkItemTypeTemplateUpdateModel struct {
+ // Describes the type of the action for the update request.
+ ActionType *ProvisioningActionType `json:"actionType,omitempty"`
+ // Methodology to which the template belongs, eg. Agile, Scrum, CMMI.
+ Methodology *string `json:"methodology,omitempty"`
+ // String representation of the work item type template.
+ Template *string `json:"template,omitempty"`
+ // The type of the template described in the request body.
+ TemplateType *TemplateType `json:"templateType,omitempty"`
+}
+
+// Describes an update to a work item.
+type WorkItemUpdate struct {
+ Url *string `json:"url,omitempty"`
+ // Link references to related REST resources.
+ Links interface{} `json:"_links,omitempty"`
+ // List of updates to fields.
+ Fields *map[string]WorkItemFieldUpdate `json:"fields,omitempty"`
+ // ID of update.
+ Id *int `json:"id,omitempty"`
+ // List of updates to relations.
+ Relations *WorkItemRelationUpdates `json:"relations,omitempty"`
+ // The revision number of work item update.
+ Rev *int `json:"rev,omitempty"`
+ // Identity for the work item update.
+ RevisedBy *IdentityReference `json:"revisedBy,omitempty"`
+ // The work item updates revision date.
+ RevisedDate *azuredevops.Time `json:"revisedDate,omitempty"`
+ // The work item ID.
+ WorkItemId *int `json:"workItemId,omitempty"`
+}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 12d352d53..374477fc7 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -93,6 +93,7 @@ github.com/hashicorp/errwrap
# github.com/hashicorp/go-cleanhttp v0.5.1
github.com/hashicorp/go-cleanhttp
# github.com/hashicorp/go-getter v1.4.2-0.20200106182914-9813cbd4eb02
+## explicit
github.com/hashicorp/go-getter
github.com/hashicorp/go-getter/helper/url
# github.com/hashicorp/go-hclog v0.9.2
@@ -123,6 +124,7 @@ github.com/hashicorp/hcl/json/parser
github.com/hashicorp/hcl/json/scanner
github.com/hashicorp/hcl/json/token
# github.com/hashicorp/hcl/v2 v2.3.0
+## explicit
github.com/hashicorp/hcl/v2
github.com/hashicorp/hcl/v2/ext/customdecode
github.com/hashicorp/hcl/v2/ext/dynblock
@@ -136,9 +138,8 @@ github.com/hashicorp/hcl/v2/hclwrite
github.com/hashicorp/hcl/v2/json
# github.com/hashicorp/logutils v1.0.0
github.com/hashicorp/logutils
-# github.com/hashicorp/terraform v0.12.23
-## explicit
# github.com/hashicorp/terraform-config-inspect v0.0.0-20191212124732-c6ae6269b9d7
+## explicit
github.com/hashicorp/terraform-config-inspect/tfconfig
# github.com/hashicorp/terraform-json v0.4.0
github.com/hashicorp/terraform-json
@@ -207,31 +208,40 @@ github.com/mattn/go-isatty
# github.com/microsoft/azure-devops-go-api/azuredevops v1.0.0-b3
## explicit
github.com/microsoft/azure-devops-go-api/azuredevops
-github.com/microsoft/azure-devops-go-api/azuredevops/accounts
-github.com/microsoft/azure-devops-go-api/azuredevops/build
-github.com/microsoft/azure-devops-go-api/azuredevops/commerce
-github.com/microsoft/azure-devops-go-api/azuredevops/core
github.com/microsoft/azure-devops-go-api/azuredevops/delegatedauthorization
-github.com/microsoft/azure-devops-go-api/azuredevops/distributedtaskcommon
-github.com/microsoft/azure-devops-go-api/azuredevops/featuremanagement
-github.com/microsoft/azure-devops-go-api/azuredevops/forminput
-github.com/microsoft/azure-devops-go-api/azuredevops/git
-github.com/microsoft/azure-devops-go-api/azuredevops/graph
github.com/microsoft/azure-devops-go-api/azuredevops/identity
-github.com/microsoft/azure-devops-go-api/azuredevops/licensing
-github.com/microsoft/azure-devops-go-api/azuredevops/licensingrule
-github.com/microsoft/azure-devops-go-api/azuredevops/memberentitlementmanagement
-github.com/microsoft/azure-devops-go-api/azuredevops/operations
-github.com/microsoft/azure-devops-go-api/azuredevops/policy
-github.com/microsoft/azure-devops-go-api/azuredevops/profile
-github.com/microsoft/azure-devops-go-api/azuredevops/release
github.com/microsoft/azure-devops-go-api/azuredevops/security
-github.com/microsoft/azure-devops-go-api/azuredevops/serviceendpoint
github.com/microsoft/azure-devops-go-api/azuredevops/system
-github.com/microsoft/azure-devops-go-api/azuredevops/taskagent
-github.com/microsoft/azure-devops-go-api/azuredevops/test
github.com/microsoft/azure-devops-go-api/azuredevops/webapi
github.com/microsoft/azure-devops-go-api/azuredevops/workitemtracking
+# github.com/microsoft/azure-devops-go-api/azuredevops/v6 v6.0.1
+## explicit
+github.com/microsoft/azure-devops-go-api/azuredevops/v6
+github.com/microsoft/azure-devops-go-api/azuredevops/v6/accounts
+github.com/microsoft/azure-devops-go-api/azuredevops/v6/build
+github.com/microsoft/azure-devops-go-api/azuredevops/v6/commerce
+github.com/microsoft/azure-devops-go-api/azuredevops/v6/core
+github.com/microsoft/azure-devops-go-api/azuredevops/v6/delegatedauthorization
+github.com/microsoft/azure-devops-go-api/azuredevops/v6/distributedtaskcommon
+github.com/microsoft/azure-devops-go-api/azuredevops/v6/featuremanagement
+github.com/microsoft/azure-devops-go-api/azuredevops/v6/forminput
+github.com/microsoft/azure-devops-go-api/azuredevops/v6/git
+github.com/microsoft/azure-devops-go-api/azuredevops/v6/graph
+github.com/microsoft/azure-devops-go-api/azuredevops/v6/identity
+github.com/microsoft/azure-devops-go-api/azuredevops/v6/licensing
+github.com/microsoft/azure-devops-go-api/azuredevops/v6/licensingrule
+github.com/microsoft/azure-devops-go-api/azuredevops/v6/memberentitlementmanagement
+github.com/microsoft/azure-devops-go-api/azuredevops/v6/operations
+github.com/microsoft/azure-devops-go-api/azuredevops/v6/policy
+github.com/microsoft/azure-devops-go-api/azuredevops/v6/profile
+github.com/microsoft/azure-devops-go-api/azuredevops/v6/release
+github.com/microsoft/azure-devops-go-api/azuredevops/v6/security
+github.com/microsoft/azure-devops-go-api/azuredevops/v6/serviceendpoint
+github.com/microsoft/azure-devops-go-api/azuredevops/v6/system
+github.com/microsoft/azure-devops-go-api/azuredevops/v6/taskagent
+github.com/microsoft/azure-devops-go-api/azuredevops/v6/test
+github.com/microsoft/azure-devops-go-api/azuredevops/v6/webapi
+github.com/microsoft/azure-devops-go-api/azuredevops/v6/workitemtracking
# github.com/mitchellh/cli v1.0.0
github.com/mitchellh/cli
# github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db