func (client *ClientImpl) GetManualInterventions(ctx context.Context, args GetManualInterventionsArgs) (*[]ManualIntervention, 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.ReleaseId == nil {
		return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.ReleaseId"}
	}
	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)
	if err != nil {
		return nil, err
	}
	var responseValue []ManualIntervention
	err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
	return &responseValue, err
}
List all manual interventions for a given release.
package release
import (
	"bytes"
	"context"
	"encoding/json"
	"github.com/google/uuid"
	"github.com/microsoft/azure-devops-go-api/azuredevops"
	"io"
	"net/http"
	"net/url"
	"strconv"
	"strings"
)
var ResourceAreaId, _ = uuid.Parse("efc2f575-36ef-48e9-b672-0c6fb4a48ac5")
type Client interface {
	CreateFolder(context.Context, CreateFolderArgs) (*Folder, error)
	CreateRelease(context.Context, CreateReleaseArgs) (*Release, error)
	CreateReleaseDefinition(context.Context, CreateReleaseDefinitionArgs) (*ReleaseDefinition, error)
	DeleteFolder(context.Context, DeleteFolderArgs) error
	DeleteReleaseDefinition(context.Context, DeleteReleaseDefinitionArgs) error
	GetApprovals(context.Context, GetApprovalsArgs) (*GetApprovalsResponseValue, error)
	GetDefinitionRevision(context.Context, GetDefinitionRevisionArgs) (io.ReadCloser, error)
	GetDeployments(context.Context, GetDeploymentsArgs) (*GetDeploymentsResponseValue, error)
	GetFolders(context.Context, GetFoldersArgs) (*[]Folder, error)
	GetLogs(context.Context, GetLogsArgs) (io.ReadCloser, error)
	GetManualIntervention(context.Context, GetManualInterventionArgs) (*ManualIntervention, error)
	GetManualInterventions(context.Context, GetManualInterventionsArgs) (*[]ManualIntervention, error)
	GetRelease(context.Context, GetReleaseArgs) (*Release, error)
	GetReleaseDefinition(context.Context, GetReleaseDefinitionArgs) (*ReleaseDefinition, error)
	GetReleaseDefinitionHistory(context.Context, GetReleaseDefinitionHistoryArgs) (*[]ReleaseDefinitionRevision, error)
	GetReleaseDefinitions(context.Context, GetReleaseDefinitionsArgs) (*GetReleaseDefinitionsResponseValue, error)
	GetReleaseEnvironment(context.Context, GetReleaseEnvironmentArgs) (*ReleaseEnvironment, error)
	GetReleaseRevision(context.Context, GetReleaseRevisionArgs) (io.ReadCloser, error)
	GetReleases(context.Context, GetReleasesArgs) (*GetReleasesResponseValue, error)
	GetReleaseTaskAttachmentContent(context.Context, GetReleaseTaskAttachmentContentArgs) (io.ReadCloser, error)
	GetReleaseTaskAttachments(context.Context, GetReleaseTaskAttachmentsArgs) (*[]ReleaseTaskAttachment, error)
	GetTaskLog(context.Context, GetTaskLogArgs) (io.ReadCloser, error)
	UpdateFolder(context.Context, UpdateFolderArgs) (*Folder, error)
	UpdateGates(context.Context, UpdateGatesArgs) (*ReleaseGates, error)
	UpdateManualIntervention(context.Context, UpdateManualInterventionArgs) (*ManualIntervention, error)
	UpdateRelease(context.Context, UpdateReleaseArgs) (*Release, error)
	UpdateReleaseApproval(context.Context, UpdateReleaseApprovalArgs) (*ReleaseApproval, error)
	UpdateReleaseDefinition(context.Context, UpdateReleaseDefinitionArgs) (*ReleaseDefinition, error)
	UpdateReleaseEnvironment(context.Context, UpdateReleaseEnvironmentArgs) (*ReleaseEnvironment, error)
	UpdateReleaseResource(context.Context, UpdateReleaseResourceArgs) (*Release, 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
}
func (client *ClientImpl) CreateFolder(ctx context.Context, args CreateFolderArgs) (*Folder, error) {
	if args.Folder == nil {
		return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.Folder"}
	}
	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.Folder)
	if marshalErr != nil {
		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)
	if err != nil {
		return nil, err
	}
	var responseValue Folder
	err = client.Client.UnmarshalBody(resp, &responseValue)
	return &responseValue, err
}
type CreateFolderArgs struct {
	Folder *Folder
	Project *string
}
func (client *ClientImpl) CreateRelease(ctx context.Context, args CreateReleaseArgs) (*Release, error) {
	if args.ReleaseStartMetadata == nil {
		return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.ReleaseStartMetadata"}
	}
	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.ReleaseStartMetadata)
	if marshalErr != nil {
		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)
	if err != nil {
		return nil, err
	}
	var responseValue Release
	err = client.Client.UnmarshalBody(resp, &responseValue)
	return &responseValue, err
}
type CreateReleaseArgs struct {
	ReleaseStartMetadata *ReleaseStartMetadata
	Project *string
}
func (client *ClientImpl) CreateReleaseDefinition(ctx context.Context, args CreateReleaseDefinitionArgs) (*ReleaseDefinition, error) {
	if args.ReleaseDefinition == nil {
		return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.ReleaseDefinition"}
	}
	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.ReleaseDefinition)
	if marshalErr != nil {
		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)
	if err != nil {
		return nil, err
	}
	var responseValue ReleaseDefinition
	err = client.Client.UnmarshalBody(resp, &responseValue)
	return &responseValue, err
}
type CreateReleaseDefinitionArgs struct {
	ReleaseDefinition *ReleaseDefinition
	Project *string
}
func (client *ClientImpl) DeleteFolder(ctx context.Context, args DeleteFolderArgs) error {
	routeValues := make(map[string]string)
	if args.Project == nil || *args.Project == "" {
		return &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
	}
	routeValues["project"] = *args.Project
	if args.Path == nil || *args.Path == "" {
		return &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Path"}
	}
	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)
	if err != nil {
		return err
	}
	return nil
}
type DeleteFolderArgs struct {
	Project *string
	Path *string
}
func (client *ClientImpl) DeleteReleaseDefinition(ctx context.Context, args DeleteReleaseDefinitionArgs) error {
	routeValues := make(map[string]string)
	if args.Project == nil || *args.Project == "" {
		return &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
	}
	routeValues["project"] = *args.Project
	if args.DefinitionId == nil {
		return &azuredevops.ArgumentNilError{ArgumentName: "args.DefinitionId"}
	}
	routeValues["definitionId"] = strconv.Itoa(*args.DefinitionId)
	queryParams := url.Values{}
	if args.Comment != nil {
		queryParams.Add("comment", *args.Comment)
	}
	if args.ForceDelete != nil {
		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)
	if err != nil {
		return err
	}
	return nil
}
type DeleteReleaseDefinitionArgs struct {
	Project *string
	DefinitionId *int
	Comment *string
	ForceDelete *bool
}
func (client *ClientImpl) GetApprovals(ctx context.Context, args GetApprovalsArgs) (*GetApprovalsResponseValue, 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.AssignedToFilter != nil {
		queryParams.Add("assignedToFilter", *args.AssignedToFilter)
	}
	if args.StatusFilter != nil {
		queryParams.Add("statusFilter", string(*args.StatusFilter))
	}
	if args.ReleaseIdsFilter != nil {
		var stringList []string
		for _, item := range *args.ReleaseIdsFilter {
			stringList = append(stringList, strconv.Itoa(item))
		}
		listAsString := strings.Join((stringList)[:], ",")
		queryParams.Add("releaseIdsFilter", listAsString)
	}
	if args.TypeFilter != nil {
		queryParams.Add("typeFilter", string(*args.TypeFilter))
	}
	if args.Top != nil {
		queryParams.Add("top", strconv.Itoa(*args.Top))
	}
	if args.ContinuationToken != nil {
		queryParams.Add("continuationToken", strconv.Itoa(*args.ContinuationToken))
	}
	if args.QueryOrder != nil {
		queryParams.Add("queryOrder", string(*args.QueryOrder))
	}
	if args.IncludeMyGroupApprovals != nil {
		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)
	if err != nil {
		return nil, err
	}
	var responseValue GetApprovalsResponseValue
	responseValue.ContinuationToken = resp.Header.Get(azuredevops.HeaderKeyContinuationToken)
	err = client.Client.UnmarshalCollectionBody(resp, &responseValue.Value)
	return &responseValue, err
}
type GetApprovalsArgs struct {
	Project *string
	AssignedToFilter *string
	StatusFilter *ApprovalStatus
	ReleaseIdsFilter *[]int
	TypeFilter *ApprovalType
	Top *int
	ContinuationToken *int
	QueryOrder *ReleaseQueryOrder
	IncludeMyGroupApprovals *bool
}
type GetApprovalsResponseValue struct {
	Value []ReleaseApproval
	ContinuationToken string
}
func (client *ClientImpl) GetDefinitionRevision(ctx context.Context, args GetDefinitionRevisionArgs) (io.ReadCloser, 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.DefinitionId == nil {
		return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.DefinitionId"}
	}
	routeValues["definitionId"] = strconv.Itoa(*args.DefinitionId)
	if args.Revision == nil {
		return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.Revision"}
	}
	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)
	if err != nil {
		return nil, err
	}
	return resp.Body, err
}
type GetDefinitionRevisionArgs struct {
	Project *string
	DefinitionId *int
	Revision *int
}
func (client *ClientImpl) GetDeployments(ctx context.Context, args GetDeploymentsArgs) (*GetDeploymentsResponseValue, 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.DefinitionId != nil {
		queryParams.Add("definitionId", strconv.Itoa(*args.DefinitionId))
	}
	if args.DefinitionEnvironmentId != nil {
		queryParams.Add("definitionEnvironmentId", strconv.Itoa(*args.DefinitionEnvironmentId))
	}
	if args.CreatedBy != nil {
		queryParams.Add("createdBy", *args.CreatedBy)
	}
	if args.MinModifiedTime != nil {
		queryParams.Add("minModifiedTime", (*args.MinModifiedTime).AsQueryParameter())
	}
	if args.MaxModifiedTime != nil {
		queryParams.Add("maxModifiedTime", (*args.MaxModifiedTime).AsQueryParameter())
	}
	if args.DeploymentStatus != nil {
		queryParams.Add("deploymentStatus", string(*args.DeploymentStatus))
	}
	if args.OperationStatus != nil {
		queryParams.Add("operationStatus", string(*args.OperationStatus))
	}
	if args.LatestAttemptsOnly != nil {
		queryParams.Add("latestAttemptsOnly", strconv.FormatBool(*args.LatestAttemptsOnly))
	}
	if args.QueryOrder != nil {
		queryParams.Add("queryOrder", string(*args.QueryOrder))
	}
	if args.Top != nil {
		queryParams.Add("$top", strconv.Itoa(*args.Top))
	}
	if args.ContinuationToken != nil {
		queryParams.Add("continuationToken", strconv.Itoa(*args.ContinuationToken))
	}
	if args.CreatedFor != nil {
		queryParams.Add("createdFor", *args.CreatedFor)
	}
	if args.MinStartedTime != nil {
		queryParams.Add("minStartedTime", (*args.MinStartedTime).AsQueryParameter())
	}
	if args.MaxStartedTime != nil {
		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)
	if err != nil {
		return nil, err
	}
	var responseValue GetDeploymentsResponseValue
	responseValue.ContinuationToken = resp.Header.Get(azuredevops.HeaderKeyContinuationToken)
	err = client.Client.UnmarshalCollectionBody(resp, &responseValue.Value)
	return &responseValue, err
}
type GetDeploymentsArgs struct {
	Project *string
	DefinitionId *int
	DefinitionEnvironmentId *int
	CreatedBy *string
	MinModifiedTime *azuredevops.Time
	MaxModifiedTime *azuredevops.Time
	DeploymentStatus *DeploymentStatus
	OperationStatus *DeploymentOperationStatus
	LatestAttemptsOnly *bool
	QueryOrder *ReleaseQueryOrder
	Top *int
	ContinuationToken *int
	CreatedFor *string
	MinStartedTime *azuredevops.Time
	MaxStartedTime *azuredevops.Time
	SourceBranch *string
}
type GetDeploymentsResponseValue struct {
	Value []Deployment
	ContinuationToken string
}
func (client *ClientImpl) GetFolders(ctx context.Context, args GetFoldersArgs) (*[]Folder, 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.Path != nil && *args.Path != "" {
		routeValues["path"] = *args.Path
	}
	queryParams := url.Values{}
	if args.QueryOrder != nil {
		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)
	if err != nil {
		return nil, err
	}
	var responseValue []Folder
	err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
	return &responseValue, err
}
type GetFoldersArgs struct {
	Project *string
	Path *string
	QueryOrder *FolderPathQueryOrder
}
func (client *ClientImpl) GetLogs(ctx context.Context, args GetLogsArgs) (io.ReadCloser, 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.ReleaseId == nil {
		return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.ReleaseId"}
	}
	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)
	if err != nil {
		return nil, err
	}
	return resp.Body, err
}
type GetLogsArgs struct {
	Project *string
	ReleaseId *int
}
func (client *ClientImpl) GetManualIntervention(ctx context.Context, args GetManualInterventionArgs) (*ManualIntervention, 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.ReleaseId == nil {
		return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.ReleaseId"}
	}
	routeValues["releaseId"] = strconv.Itoa(*args.ReleaseId)
	if args.ManualInterventionId == nil {
		return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.ManualInterventionId"}
	}
	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)
	if err != nil {
		return nil, err
	}
	var responseValue ManualIntervention
	err = client.Client.UnmarshalBody(resp, &responseValue)
	return &responseValue, err
}
type GetManualInterventionArgs struct {
	Project *string
	ReleaseId *int
	ManualInterventionId *int
}