func IsAppGUIDRequiredError(err error) bool {
	statusCodeError, ok := err.(HTTPStatusCodeError)
	if !ok {
		return false
	}
	if statusCodeError.StatusCode != http.StatusUnprocessableEntity {
		return false
	}
	if statusCodeError.ErrorMessage == nil || statusCodeError.Description == nil {
		return false
	}
	if *statusCodeError.ErrorMessage != AppGUIDRequiredErrorMessage {
		return false
	}
	return *statusCodeError.Description == AppGUIDRequiredErrorDescription
}
IsAppGUIDRequiredError returns whether the error corresponds to the
conventional way of indicating that a service only supports credential-type
bindings.
package v2
import (
	"fmt"
	"net/http"
)
type HTTPStatusCodeError struct {
	StatusCode int
	ErrorMessage *string
	Description *string
	ResponseError error
}
func (e HTTPStatusCodeError) Error() string {
	errorMessage := "<nil>"
	description := "<nil>"
	if e.ErrorMessage != nil {
		errorMessage = *e.ErrorMessage
	}
	if e.Description != nil {
		description = *e.Description
	}
	return fmt.Sprintf("Status: %v; ErrorMessage: %v; Description: %v; ResponseError: %v", e.StatusCode, errorMessage, description, e.ResponseError)
}
func IsHTTPError(err error) (*HTTPStatusCodeError, bool) {
	statusCodeError, ok := err.(HTTPStatusCodeError)
	if ok {
		return &statusCodeError, ok
	}
	statusCodeErrorPointer, ok := err.(*HTTPStatusCodeError)
	if ok {
		return statusCodeErrorPointer, ok
	}
	return nil, ok
}
func IsGoneError(err error) bool {
	statusCodeError, ok := err.(HTTPStatusCodeError)
	if !ok {
		return false
	}
	return statusCodeError.StatusCode == http.StatusGone
}
func IsConflictError(err error) bool {
	statusCodeError, ok := err.(HTTPStatusCodeError)
	if !ok {
		return false
	}
	return statusCodeError.StatusCode == http.StatusConflict
}
const (
	AsyncErrorMessage               = "AsyncRequired"
	AsyncErrorDescription           = "This service plan requires client support for asynchronous service operations."
	AppGUIDRequiredErrorMessage     = "RequiresApp"
	AppGUIDRequiredErrorDescription = "This service supports generation of credentials through binding an application only."
)
func IsAsyncRequiredError(err error) bool {
	statusCodeError, ok := err.(HTTPStatusCodeError)
	if !ok {
		return false
	}
	if statusCodeError.StatusCode != http.StatusUnprocessableEntity {
		return false
	}
	if statusCodeError.ErrorMessage == nil || statusCodeError.Description == nil {
		return false
	}
	if *statusCodeError.ErrorMessage != AsyncErrorMessage {
		return false
	}
	return *statusCodeError.Description == AsyncErrorDescription
}