func (p *ProtocolVersion) UnmarshalYAML(unmarshal func(interface{}) error) error {
	var s string
	if err := unmarshal(&s); err != nil {
		return err
	}
	switch s {
	case "BI1.0":
		*p = ProtocolV1_0
		return nil
	case "BI1.1":
		*p = ProtocolV1_1
		return nil
	default:
		return errUnknownProtocol.New()
	}
}
UnmarshalYAML implements yaml.Unmarshaler.
package interop
import (
	"encoding/hex"
	"encoding/json"
	"strings"
	"go.thethings.network/lorawan-stack/v3/pkg/errors"
	"go.thethings.network/lorawan-stack/v3/pkg/ttnpb"
	"go.thethings.network/lorawan-stack/v3/pkg/types"
)
type ProtocolVersion string
const (
	ProtocolV1_0 = "1.0"
	ProtocolV1_1 = "1.1"
)
var errUnknownProtocol = errors.DefineInvalidArgument("unknown_protocol", "unknown protocol")