Copyright 2018 The Go Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

package impl

import (
	
	
	

	
	
	
	pref 
	piface 
)
Export is a zero-length named type that exists only to export a set of functions that we do not want to appear in godoc.
type Export struct{}
NewError formats a string according to the format specifier and arguments and returns an error that has a "proto" prefix.
func (Export) ( string,  ...interface{}) error {
	return errors.New(, ...)
}
enum is any enum type generated by protoc-gen-go and must be a named int32 type.
type enum = interface{}
EnumOf returns the protoreflect.Enum interface over e. It returns nil if e is nil.
func (Export) ( enum) pref.Enum {
	switch e := .(type) {
	case nil:
		return nil
	case pref.Enum:
		return 
	default:
		return legacyWrapEnum(reflect.ValueOf())
	}
}
EnumDescriptorOf returns the protoreflect.EnumDescriptor for e. It returns nil if e is nil.
func (Export) ( enum) pref.EnumDescriptor {
	switch e := .(type) {
	case nil:
		return nil
	case pref.Enum:
		return .Descriptor()
	default:
		return LegacyLoadEnumDesc(reflect.TypeOf())
	}
}
EnumTypeOf returns the protoreflect.EnumType for e. It returns nil if e is nil.
func (Export) ( enum) pref.EnumType {
	switch e := .(type) {
	case nil:
		return nil
	case pref.Enum:
		return .Type()
	default:
		return legacyLoadEnumType(reflect.TypeOf())
	}
}
EnumStringOf returns the enum value as a string, either as the name if the number is resolvable, or the number formatted as a string.
func (Export) ( pref.EnumDescriptor,  pref.EnumNumber) string {
	 := .Values().ByNumber()
	if  != nil {
		return string(.Name())
	}
	return strconv.Itoa(int())
}
message is any message type generated by protoc-gen-go and must be a pointer to a named struct type.
type message = interface{}
legacyMessageWrapper wraps a v2 message as a v1 message.
ProtoMessageV1Of converts either a v1 or v2 message to a v1 message. It returns nil if m is nil.
func (Export) ( message) piface.MessageV1 {
	switch mv := .(type) {
	case nil:
		return nil
	case piface.MessageV1:
		return 
	case unwrapper:
		return Export{}.(.protoUnwrap())
	case pref.ProtoMessage:
		return legacyMessageWrapper{}
	default:
		panic(fmt.Sprintf("message %T is neither a v1 or v2 Message", ))
	}
}

func (Export) ( message) pref.ProtoMessage {
	switch mv := .(type) {
	case nil:
		return nil
	case pref.ProtoMessage:
		return 
	case legacyMessageWrapper:
		return .m
	case piface.MessageV1:
		return nil
	default:
		panic(fmt.Sprintf("message %T is neither a v1 or v2 Message", ))
	}
}
ProtoMessageV2Of converts either a v1 or v2 message to a v2 message. It returns nil if m is nil.
func (Export) ( message) pref.ProtoMessage {
	if  == nil {
		return nil
	}
	if  := (Export{}).protoMessageV2Of();  != nil {
		return 
	}
	return legacyWrapMessage(reflect.ValueOf()).Interface()
}
MessageOf returns the protoreflect.Message interface over m. It returns nil if m is nil.
func (Export) ( message) pref.Message {
	if  == nil {
		return nil
	}
	if  := (Export{}).protoMessageV2Of();  != nil {
		return .ProtoReflect()
	}
	return legacyWrapMessage(reflect.ValueOf())
}
MessageDescriptorOf returns the protoreflect.MessageDescriptor for m. It returns nil if m is nil.
func (Export) ( message) pref.MessageDescriptor {
	if  == nil {
		return nil
	}
	if  := (Export{}).protoMessageV2Of();  != nil {
		return .ProtoReflect().Descriptor()
	}
	return LegacyLoadMessageDesc(reflect.TypeOf())
}
MessageTypeOf returns the protoreflect.MessageType for m. It returns nil if m is nil.
func (Export) ( message) pref.MessageType {
	if  == nil {
		return nil
	}
	if  := (Export{}).protoMessageV2Of();  != nil {
		return .ProtoReflect().Type()
	}
	return legacyLoadMessageInfo(reflect.TypeOf(), "")
}
MessageStringOf returns the message value as a string, which is the message serialized in the protobuf text format.