func (client *ClientImpl) AddBuildTags(ctx context.Context, args AddBuildTagsArgs) (*[]string, error) {
	if args.Tags == nil {
		return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.Tags"}
	}
	routeValues := make(map[string]string)
	if args.Project == nil || *args.Project == "" {
		return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Project"}
	}
	routeValues["project"] = *args.Project
	if args.BuildId == nil {
		return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.BuildId"}
	}
	routeValues["buildId"] = strconv.Itoa(*args.BuildId)
	body, marshalErr := json.Marshal(*args.Tags)
	if marshalErr != nil {
		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)
	if err != nil {
		return nil, err
	}
	var responseValue []string
	err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
	return &responseValue, err
}
Adds tags to a build.
package build
import (
	"bytes"
	"context"
	"encoding/json"
	"github.com/google/uuid"
	"github.com/microsoft/azure-devops-go-api/azuredevops"
	"github.com/microsoft/azure-devops-go-api/azuredevops/webapi"
	"io"
	"net/http"
	"net/url"
	"strconv"
	"strings"
)
var ResourceAreaId, _ = uuid.Parse("965220d5-5bb9-42cf-8d67-9b146df2a5a4")
type Client interface {
	AddBuildTag(context.Context, AddBuildTagArgs) (*[]string, error)
	AddBuildTags(context.Context, AddBuildTagsArgs) (*[]string, error)
	AddDefinitionTag(context.Context, AddDefinitionTagArgs) (*[]string, error)
	AddDefinitionTags(context.Context, AddDefinitionTagsArgs) (*[]string, error)
	AuthorizeDefinitionResources(context.Context, AuthorizeDefinitionResourcesArgs) (*[]DefinitionResourceReference, error)
	AuthorizeProjectResources(context.Context, AuthorizeProjectResourcesArgs) (*[]DefinitionResourceReference, error)
	CreateArtifact(context.Context, CreateArtifactArgs) (*BuildArtifact, error)
	CreateDefinition(context.Context, CreateDefinitionArgs) (*BuildDefinition, error)
	CreateFolder(context.Context, CreateFolderArgs) (*Folder, error)
	DeleteBuild(context.Context, DeleteBuildArgs) error
	DeleteBuildTag(context.Context, DeleteBuildTagArgs) (*[]string, error)
	DeleteDefinition(context.Context, DeleteDefinitionArgs) error
	DeleteDefinitionTag(context.Context, DeleteDefinitionTagArgs) (*[]string, error)
	DeleteFolder(context.Context, DeleteFolderArgs) error
	DeleteTemplate(context.Context, DeleteTemplateArgs) error
	GetArtifact(context.Context, GetArtifactArgs) (*BuildArtifact, error)
	GetArtifactContentZip(context.Context, GetArtifactContentZipArgs) (io.ReadCloser, error)
	GetArtifacts(context.Context, GetArtifactsArgs) (*[]BuildArtifact, error)
	GetAttachment(context.Context, GetAttachmentArgs) (io.ReadCloser, error)
	GetAttachments(context.Context, GetAttachmentsArgs) (*[]Attachment, error)
	GetBuild(context.Context, GetBuildArgs) (*Build, error)
	GetBuildBadge(context.Context, GetBuildBadgeArgs) (*BuildBadge, error)
	GetBuildBadgeData(context.Context, GetBuildBadgeDataArgs) (*string, error)
	GetBuildChanges(context.Context, GetBuildChangesArgs) (*GetBuildChangesResponseValue, error)
	GetBuildController(context.Context, GetBuildControllerArgs) (*BuildController, error)
	GetBuildControllers(context.Context, GetBuildControllersArgs) (*[]BuildController, error)
	GetBuildLog(context.Context, GetBuildLogArgs) (io.ReadCloser, error)
	GetBuildLogLines(context.Context, GetBuildLogLinesArgs) (*[]string, error)
	GetBuildLogs(context.Context, GetBuildLogsArgs) (*[]BuildLog, error)
	GetBuildLogsZip(context.Context, GetBuildLogsZipArgs) (io.ReadCloser, error)
	GetBuildLogZip(context.Context, GetBuildLogZipArgs) (io.ReadCloser, error)
	GetBuildOptionDefinitions(context.Context, GetBuildOptionDefinitionsArgs) (*[]BuildOptionDefinition, error)
	GetBuildProperties(context.Context, GetBuildPropertiesArgs) (interface{}, error)
	GetBuildReport(context.Context, GetBuildReportArgs) (*BuildReportMetadata, error)
	GetBuildReportHtmlContent(context.Context, GetBuildReportHtmlContentArgs) (io.ReadCloser, error)
	GetBuilds(context.Context, GetBuildsArgs) (*GetBuildsResponseValue, error)
	GetBuildSettings(context.Context, GetBuildSettingsArgs) (*BuildSettings, error)
	GetBuildTags(context.Context, GetBuildTagsArgs) (*[]string, error)
	GetBuildTimeline(context.Context, GetBuildTimelineArgs) (*Timeline, error)
	GetBuildWorkItemsRefs(context.Context, GetBuildWorkItemsRefsArgs) (*[]webapi.ResourceRef, error)
	GetBuildWorkItemsRefsFromCommits(context.Context, GetBuildWorkItemsRefsFromCommitsArgs) (*[]webapi.ResourceRef, error)
	GetChangesBetweenBuilds(context.Context, GetChangesBetweenBuildsArgs) (*[]Change, error)
	GetDefinition(context.Context, GetDefinitionArgs) (*BuildDefinition, error)
	GetDefinitionMetrics(context.Context, GetDefinitionMetricsArgs) (*[]BuildMetric, error)
	GetDefinitionProperties(context.Context, GetDefinitionPropertiesArgs) (interface{}, error)
	GetDefinitionResources(context.Context, GetDefinitionResourcesArgs) (*[]DefinitionResourceReference, error)
	GetDefinitionRevisions(context.Context, GetDefinitionRevisionsArgs) (*[]BuildDefinitionRevision, error)
	GetDefinitions(context.Context, GetDefinitionsArgs) (*GetDefinitionsResponseValue, error)
	GetDefinitionTags(context.Context, GetDefinitionTagsArgs) (*[]string, error)
	GetFile(context.Context, GetFileArgs) (io.ReadCloser, error)
	GetFileContents(context.Context, GetFileContentsArgs) (io.ReadCloser, error)
	GetFolders(context.Context, GetFoldersArgs) (*[]Folder, error)
	GetLatestBuild(context.Context, GetLatestBuildArgs) (*Build, error)
	GetPathContents(context.Context, GetPathContentsArgs) (*[]SourceRepositoryItem, error)
	GetProjectMetrics(context.Context, GetProjectMetricsArgs) (*[]BuildMetric, error)
	GetProjectResources(context.Context, GetProjectResourcesArgs) (*[]DefinitionResourceReference, error)
	GetPullRequest(context.Context, GetPullRequestArgs) (*PullRequest, error)
	GetResourceUsage(context.Context, GetResourceUsageArgs) (*BuildResourceUsage, error)
	GetStatusBadge(context.Context, GetStatusBadgeArgs) (*string, error)
	GetTags(context.Context, GetTagsArgs) (*[]string, error)
	GetTemplate(context.Context, GetTemplateArgs) (*BuildDefinitionTemplate, error)
	GetTemplates(context.Context, GetTemplatesArgs) (*[]BuildDefinitionTemplate, error)
	GetWorkItemsBetweenBuilds(context.Context, GetWorkItemsBetweenBuildsArgs) (*[]webapi.ResourceRef, error)
	ListBranches(context.Context, ListBranchesArgs) (*[]string, error)
	ListRepositories(context.Context, ListRepositoriesArgs) (*SourceRepositories, error)
	ListSourceProviders(context.Context, ListSourceProvidersArgs) (*[]SourceProviderAttributes, error)
	ListWebhooks(context.Context, ListWebhooksArgs) (*[]RepositoryWebhook, error)
	QueueBuild(context.Context, QueueBuildArgs) (*Build, error)
	RestoreDefinition(context.Context, RestoreDefinitionArgs) (*BuildDefinition, error)
	RestoreWebhooks(context.Context, RestoreWebhooksArgs) error
	SaveTemplate(context.Context, SaveTemplateArgs) (*BuildDefinitionTemplate, error)
	UpdateBuild(context.Context, UpdateBuildArgs) (*Build, error)
	UpdateBuildProperties(context.Context, UpdateBuildPropertiesArgs) (interface{}, error)
	UpdateBuilds(context.Context, UpdateBuildsArgs) (*[]Build, error)
	UpdateBuildSettings(context.Context, UpdateBuildSettingsArgs) (*BuildSettings, error)
	UpdateDefinition(context.Context, UpdateDefinitionArgs) (*BuildDefinition, error)
	UpdateDefinitionProperties(context.Context, UpdateDefinitionPropertiesArgs) (interface{}, error)
	UpdateFolder(context.Context, UpdateFolderArgs) (*Folder, 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) AddBuildTag(ctx context.Context, args AddBuildTagArgs) (*[]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.BuildId == nil {
		return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.BuildId"}
	}
	routeValues["buildId"] = strconv.Itoa(*args.BuildId)
	if args.Tag == nil || *args.Tag == "" {
		return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.Tag"}
	}
	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)
	if err != nil {
		return nil, err
	}
	var responseValue []string
	err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
	return &responseValue, err
}
type AddBuildTagArgs struct {
	Project *string
	BuildId *int
	Tag *string
}