func (client *ClientImpl) UninstallExtensionByName(ctx context.Context, args UninstallExtensionByNameArgs) error {
	routeValues := make(map[string]string)
	if args.PublisherName == nil || *args.PublisherName == "" {
		return &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.PublisherName"}
	}
	routeValues["publisherName"] = *args.PublisherName
	if args.ExtensionName == nil || *args.ExtensionName == "" {
		return &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.ExtensionName"}
	}
	routeValues["extensionName"] = *args.ExtensionName
	queryParams := url.Values{}
	if args.Reason != nil {
		queryParams.Add("reason", *args.Reason)
	}
	if args.ReasonCode != nil {
		queryParams.Add("reasonCode", *args.ReasonCode)
	}
	locationId, _ := uuid.Parse("fb0da285-f23e-4b56-8b53-3ef5f9f6de66")
	_, err := client.Client.Send(ctx, http.MethodDelete, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
	if err != nil {
		return err
	}
	return nil
}
[Preview API] Uninstall the specified extension from the account / project collection.
package extensionmanagement
import (
	"bytes"
	"context"
	"encoding/json"
	"github.com/google/uuid"
	"github.com/microsoft/azure-devops-go-api/azuredevops"
	"net/http"
	"net/url"
	"strconv"
	"strings"
)
var ResourceAreaId, _ = uuid.Parse("6c2b0933-3600-42ae-bf8b-93d4f7e83594")
type Client interface {
	GetInstalledExtensionByName(context.Context, GetInstalledExtensionByNameArgs) (*InstalledExtension, error)
	GetInstalledExtensions(context.Context, GetInstalledExtensionsArgs) (*[]InstalledExtension, error)
	InstallExtensionByName(context.Context, InstallExtensionByNameArgs) (*InstalledExtension, error)
	UninstallExtensionByName(context.Context, UninstallExtensionByNameArgs) error
	UpdateInstalledExtension(context.Context, UpdateInstalledExtensionArgs) (*InstalledExtension, 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) GetInstalledExtensionByName(ctx context.Context, args GetInstalledExtensionByNameArgs) (*InstalledExtension, error) {
	routeValues := make(map[string]string)
	if args.PublisherName == nil || *args.PublisherName == "" {
		return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.PublisherName"}
	}
	routeValues["publisherName"] = *args.PublisherName
	if args.ExtensionName == nil || *args.ExtensionName == "" {
		return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.ExtensionName"}
	}
	routeValues["extensionName"] = *args.ExtensionName
	queryParams := url.Values{}
	if args.AssetTypes != nil {
		listAsString := strings.Join((*args.AssetTypes)[:], ":")
		queryParams.Add("assetTypes", listAsString)
	}
	locationId, _ := uuid.Parse("fb0da285-f23e-4b56-8b53-3ef5f9f6de66")
	resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
	if err != nil {
		return nil, err
	}
	var responseValue InstalledExtension
	err = client.Client.UnmarshalBody(resp, &responseValue)
	return &responseValue, err
}
type GetInstalledExtensionByNameArgs struct {
	PublisherName *string
	ExtensionName *string
	AssetTypes *[]string
}
func (client *ClientImpl) GetInstalledExtensions(ctx context.Context, args GetInstalledExtensionsArgs) (*[]InstalledExtension, error) {
	queryParams := url.Values{}
	if args.IncludeDisabledExtensions != nil {
		queryParams.Add("includeDisabledExtensions", strconv.FormatBool(*args.IncludeDisabledExtensions))
	}
	if args.IncludeErrors != nil {
		queryParams.Add("includeErrors", strconv.FormatBool(*args.IncludeErrors))
	}
	if args.AssetTypes != nil {
		listAsString := strings.Join((*args.AssetTypes)[:], ":")
		queryParams.Add("assetTypes", listAsString)
	}
	if args.IncludeInstallationIssues != nil {
		queryParams.Add("includeInstallationIssues", strconv.FormatBool(*args.IncludeInstallationIssues))
	}
	locationId, _ := uuid.Parse("275424d0-c844-4fe2-bda6-04933a1357d8")
	resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", nil, queryParams, nil, "", "application/json", nil)
	if err != nil {
		return nil, err
	}
	var responseValue []InstalledExtension
	err = client.Client.UnmarshalCollectionBody(resp, &responseValue)
	return &responseValue, err
}
type GetInstalledExtensionsArgs struct {
	IncludeDisabledExtensions *bool
	IncludeErrors *bool
	AssetTypes *[]string
	IncludeInstallationIssues *bool
}
func (client *ClientImpl) InstallExtensionByName(ctx context.Context, args InstallExtensionByNameArgs) (*InstalledExtension, error) {
	routeValues := make(map[string]string)
	if args.PublisherName == nil || *args.PublisherName == "" {
		return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.PublisherName"}
	}
	routeValues["publisherName"] = *args.PublisherName
	if args.ExtensionName == nil || *args.ExtensionName == "" {
		return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.ExtensionName"}
	}
	routeValues["extensionName"] = *args.ExtensionName
	if args.Version != nil && *args.Version != "" {
		routeValues["version"] = *args.Version
	}
	locationId, _ := uuid.Parse("fb0da285-f23e-4b56-8b53-3ef5f9f6de66")
	resp, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.1", routeValues, nil, nil, "", "application/json", nil)
	if err != nil {
		return nil, err
	}
	var responseValue InstalledExtension
	err = client.Client.UnmarshalBody(resp, &responseValue)
	return &responseValue, err
}
type InstallExtensionByNameArgs struct {
	PublisherName *string
	ExtensionName *string
	Version *string
}