// Code generated by protoc-gen-go-lite. DO NOT EDIT.
// protoc-gen-go-lite version: v0.11.0
// source: github.com/aperturerobotics/controllerbus/bus/api/api.proto

package bus_api

import (
	fmt "fmt"
	io "io"
	slices "slices"
	strconv "strconv"
	strings "strings"

	controller "github.com/aperturerobotics/controllerbus/controller"
	_ "github.com/aperturerobotics/controllerbus/controller/exec"
	directive "github.com/aperturerobotics/controllerbus/directive"
	protobuf_go_lite "github.com/aperturerobotics/protobuf-go-lite"
	json "github.com/aperturerobotics/protobuf-go-lite/json"
)

// Config are configuration arguments.
type Config struct {
	unknownFields []byte
	// EnableExecController enables the exec controller API.
	EnableExecController bool `protobuf:"varint,1,opt,name=enable_exec_controller,json=enableExecController,proto3" json:"enableExecController,omitempty"`
}

func (x *Config) Reset() {
	*x = Config{}
}

func (*Config) ProtoMessage() {}

func (x *Config) GetEnableExecController() bool {
	if x != nil {
		return x.EnableExecController
	}
	return false
}

// GetBusInfoRequest is the request type for GetBusInfo.
type GetBusInfoRequest struct {
	unknownFields []byte
}

func (x *GetBusInfoRequest) Reset() {
	*x = GetBusInfoRequest{}
}

func (*GetBusInfoRequest) ProtoMessage() {}

// GetBusInfoResponse is the response type for GetBusInfo.
type GetBusInfoResponse struct {
	unknownFields []byte
	// RunningControllers is the list of running controllers.
	RunningControllers []*controller.Info `protobuf:"bytes,1,rep,name=running_controllers,json=runningControllers,proto3" json:"runningControllers,omitempty"`
	// RunningDirectives is the list of running directives.
	RunningDirectives []*directive.DirectiveState `protobuf:"bytes,2,rep,name=running_directives,json=runningDirectives,proto3" json:"runningDirectives,omitempty"`
}

func (x *GetBusInfoResponse) Reset() {
	*x = GetBusInfoResponse{}
}

func (*GetBusInfoResponse) ProtoMessage() {}

func (x *GetBusInfoResponse) GetRunningControllers() []*controller.Info {
	if x != nil {
		return x.RunningControllers
	}
	return nil
}

func (x *GetBusInfoResponse) GetRunningDirectives() []*directive.DirectiveState {
	if x != nil {
		return x.RunningDirectives
	}
	return nil
}

func (m *Config) CloneVT() *Config {
	if m == nil {
		return (*Config)(nil)
	}
	r := new(Config)
	r.EnableExecController = m.EnableExecController
	if len(m.unknownFields) > 0 {
		r.unknownFields = slices.Clone(m.unknownFields)
	}
	return r
}

func (m *Config) CloneMessageVT() protobuf_go_lite.CloneMessage {
	return m.CloneVT()
}

func (m *GetBusInfoRequest) CloneVT() *GetBusInfoRequest {
	if m == nil {
		return (*GetBusInfoRequest)(nil)
	}
	r := new(GetBusInfoRequest)
	if len(m.unknownFields) > 0 {
		r.unknownFields = slices.Clone(m.unknownFields)
	}
	return r
}

func (m *GetBusInfoRequest) CloneMessageVT() protobuf_go_lite.CloneMessage {
	return m.CloneVT()
}

func (m *GetBusInfoResponse) CloneVT() *GetBusInfoResponse {
	if m == nil {
		return (*GetBusInfoResponse)(nil)
	}
	r := new(GetBusInfoResponse)
	if rhs := m.RunningControllers; rhs != nil {
		r.RunningControllers = make([]*controller.Info, len(rhs))
		for k, v := range rhs {
			r.RunningControllers[k] = v.CloneVT()
		}
	}
	if rhs := m.RunningDirectives; rhs != nil {
		r.RunningDirectives = make([]*directive.DirectiveState, len(rhs))
		for k, v := range rhs {
			r.RunningDirectives[k] = v.CloneVT()
		}
	}
	if len(m.unknownFields) > 0 {
		r.unknownFields = slices.Clone(m.unknownFields)
	}
	return r
}

func (m *GetBusInfoResponse) CloneMessageVT() protobuf_go_lite.CloneMessage {
	return m.CloneVT()
}

func (this *Config) EqualVT(that *Config) bool {
	if this == that {
		return true
	} else if this == nil || that == nil {
		return false
	}
	if this.EnableExecController != that.EnableExecController {
		return false
	}
	return string(this.unknownFields) == string(that.unknownFields)
}

func (this *Config) EqualMessageVT(thatMsg any) bool {
	that, ok := thatMsg.(*Config)
	if !ok {
		return false
	}
	return this.EqualVT(that)
}
func (this *GetBusInfoRequest) EqualVT(that *GetBusInfoRequest) bool {
	if this == that {
		return true
	} else if this == nil || that == nil {
		return false
	}
	return string(this.unknownFields) == string(that.unknownFields)
}

func (this *GetBusInfoRequest) EqualMessageVT(thatMsg any) bool {
	that, ok := thatMsg.(*GetBusInfoRequest)
	if !ok {
		return false
	}
	return this.EqualVT(that)
}
func (this *GetBusInfoResponse) EqualVT(that *GetBusInfoResponse) bool {
	if this == that {
		return true
	} else if this == nil || that == nil {
		return false
	}
	if len(this.RunningControllers) != len(that.RunningControllers) {
		return false
	}
	for i, vx := range this.RunningControllers {
		vy := that.RunningControllers[i]
		if p, q := vx, vy; p != q {
			if p == nil {
				p = &controller.Info{}
			}
			if q == nil {
				q = &controller.Info{}
			}
			if !p.EqualVT(q) {
				return false
			}
		}
	}
	if len(this.RunningDirectives) != len(that.RunningDirectives) {
		return false
	}
	for i, vx := range this.RunningDirectives {
		vy := that.RunningDirectives[i]
		if p, q := vx, vy; p != q {
			if p == nil {
				p = &directive.DirectiveState{}
			}
			if q == nil {
				q = &directive.DirectiveState{}
			}
			if !p.EqualVT(q) {
				return false
			}
		}
	}
	return string(this.unknownFields) == string(that.unknownFields)
}

func (this *GetBusInfoResponse) EqualMessageVT(thatMsg any) bool {
	that, ok := thatMsg.(*GetBusInfoResponse)
	if !ok {
		return false
	}
	return this.EqualVT(that)
}

// MarshalProtoJSON marshals the Config message to JSON.
func (x *Config) MarshalProtoJSON(s *json.MarshalState) {
	if x == nil {
		s.WriteNil()
		return
	}
	s.WriteObjectStart()
	var wroteField bool
	if x.EnableExecController || s.HasField("enableExecController") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("enableExecController")
		s.WriteBool(x.EnableExecController)
	}
	s.WriteObjectEnd()
}

// MarshalJSON marshals the Config to JSON.
func (x *Config) MarshalJSON() ([]byte, error) {
	return json.DefaultMarshalerConfig.Marshal(x)
}

// UnmarshalProtoJSON unmarshals the Config message from JSON.
func (x *Config) UnmarshalProtoJSON(s *json.UnmarshalState) {
	if s.ReadNil() {
		return
	}
	s.ReadObject(func(key string) {
		switch key {
		default:
			s.Skip() // ignore unknown field
		case "enable_exec_controller", "enableExecController":
			s.AddField("enable_exec_controller")
			x.EnableExecController = s.ReadBool()
		}
	})
}

// UnmarshalJSON unmarshals the Config from JSON.
func (x *Config) UnmarshalJSON(b []byte) error {
	return json.DefaultUnmarshalerConfig.Unmarshal(b, x)
}

// MarshalProtoJSON marshals the GetBusInfoRequest message to JSON.
func (x *GetBusInfoRequest) MarshalProtoJSON(s *json.MarshalState) {
	if x == nil {
		s.WriteNil()
		return
	}
	s.WriteObjectStart()
	s.WriteObjectEnd()
}

// MarshalJSON marshals the GetBusInfoRequest to JSON.
func (x *GetBusInfoRequest) MarshalJSON() ([]byte, error) {
	return json.DefaultMarshalerConfig.Marshal(x)
}

// UnmarshalProtoJSON unmarshals the GetBusInfoRequest message from JSON.
func (x *GetBusInfoRequest) UnmarshalProtoJSON(s *json.UnmarshalState) {
	if s.ReadNil() {
		return
	}
	s.ReadObject(func(key string) {
		// no fields
	})
}

// UnmarshalJSON unmarshals the GetBusInfoRequest from JSON.
func (x *GetBusInfoRequest) UnmarshalJSON(b []byte) error {
	return json.DefaultUnmarshalerConfig.Unmarshal(b, x)
}

// MarshalProtoJSON marshals the GetBusInfoResponse message to JSON.
func (x *GetBusInfoResponse) MarshalProtoJSON(s *json.MarshalState) {
	if x == nil {
		s.WriteNil()
		return
	}
	s.WriteObjectStart()
	var wroteField bool
	if len(x.RunningControllers) > 0 || s.HasField("runningControllers") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("runningControllers")
		s.WriteArrayStart()
		var wroteElement bool
		for _, element := range x.RunningControllers {
			s.WriteMoreIf(&wroteElement)
			element.MarshalProtoJSON(s.WithField("runningControllers"))
		}
		s.WriteArrayEnd()
	}
	if len(x.RunningDirectives) > 0 || s.HasField("runningDirectives") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("runningDirectives")
		s.WriteArrayStart()
		var wroteElement bool
		for _, element := range x.RunningDirectives {
			s.WriteMoreIf(&wroteElement)
			element.MarshalProtoJSON(s.WithField("runningDirectives"))
		}
		s.WriteArrayEnd()
	}
	s.WriteObjectEnd()
}

// MarshalJSON marshals the GetBusInfoResponse to JSON.
func (x *GetBusInfoResponse) MarshalJSON() ([]byte, error) {
	return json.DefaultMarshalerConfig.Marshal(x)
}

// UnmarshalProtoJSON unmarshals the GetBusInfoResponse message from JSON.
func (x *GetBusInfoResponse) UnmarshalProtoJSON(s *json.UnmarshalState) {
	if s.ReadNil() {
		return
	}
	s.ReadObject(func(key string) {
		switch key {
		default:
			s.Skip() // ignore unknown field
		case "running_controllers", "runningControllers":
			s.AddField("running_controllers")
			if s.ReadNil() {
				x.RunningControllers = nil
				return
			}
			s.ReadArray(func() {
				if s.ReadNil() {
					x.RunningControllers = append(x.RunningControllers, nil)
					return
				}
				v := &controller.Info{}
				v.UnmarshalProtoJSON(s.WithField("running_controllers", false))
				if s.Err() != nil {
					return
				}
				x.RunningControllers = append(x.RunningControllers, v)
			})
		case "running_directives", "runningDirectives":
			s.AddField("running_directives")
			if s.ReadNil() {
				x.RunningDirectives = nil
				return
			}
			s.ReadArray(func() {
				if s.ReadNil() {
					x.RunningDirectives = append(x.RunningDirectives, nil)
					return
				}
				v := &directive.DirectiveState{}
				v.UnmarshalProtoJSON(s.WithField("running_directives", false))
				if s.Err() != nil {
					return
				}
				x.RunningDirectives = append(x.RunningDirectives, v)
			})
		}
	})
}

// UnmarshalJSON unmarshals the GetBusInfoResponse from JSON.
func (x *GetBusInfoResponse) UnmarshalJSON(b []byte) error {
	return json.DefaultUnmarshalerConfig.Unmarshal(b, x)
}

func (m *Config) MarshalVT() (dAtA []byte, err error) {
	if m == nil {
		return nil, nil
	}
	size := m.SizeVT()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBufferVT(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *Config) MarshalToVT(dAtA []byte) (int, error) {
	size := m.SizeVT()
	return m.MarshalToSizedBufferVT(dAtA[:size])
}

func (m *Config) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
	if m == nil {
		return 0, nil
	}
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.unknownFields != nil {
		i -= len(m.unknownFields)
		copy(dAtA[i:], m.unknownFields)
	}
	if m.EnableExecController {
		i--
		if m.EnableExecController {
			dAtA[i] = 1
		} else {
			dAtA[i] = 0
		}
		i--
		dAtA[i] = 0x8
	}
	return len(dAtA) - i, nil
}

func (m *GetBusInfoRequest) MarshalVT() (dAtA []byte, err error) {
	if m == nil {
		return nil, nil
	}
	size := m.SizeVT()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBufferVT(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *GetBusInfoRequest) MarshalToVT(dAtA []byte) (int, error) {
	size := m.SizeVT()
	return m.MarshalToSizedBufferVT(dAtA[:size])
}

func (m *GetBusInfoRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
	if m == nil {
		return 0, nil
	}
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.unknownFields != nil {
		i -= len(m.unknownFields)
		copy(dAtA[i:], m.unknownFields)
	}
	return len(dAtA) - i, nil
}

func (m *GetBusInfoResponse) MarshalVT() (dAtA []byte, err error) {
	if m == nil {
		return nil, nil
	}
	size := m.SizeVT()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBufferVT(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *GetBusInfoResponse) MarshalToVT(dAtA []byte) (int, error) {
	size := m.SizeVT()
	return m.MarshalToSizedBufferVT(dAtA[:size])
}

func (m *GetBusInfoResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
	if m == nil {
		return 0, nil
	}
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.unknownFields != nil {
		i -= len(m.unknownFields)
		copy(dAtA[i:], m.unknownFields)
	}
	if len(m.RunningDirectives) > 0 {
		for iNdEx := len(m.RunningDirectives) - 1; iNdEx >= 0; iNdEx-- {
			size, err := m.RunningDirectives[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(size))
			i--
			dAtA[i] = 0x12
		}
	}
	if len(m.RunningControllers) > 0 {
		for iNdEx := len(m.RunningControllers) - 1; iNdEx >= 0; iNdEx-- {
			size, err := m.RunningControllers[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(size))
			i--
			dAtA[i] = 0xa
		}
	}
	return len(dAtA) - i, nil
}

func (m *Config) SizeVT() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.EnableExecController {
		n += 2
	}
	n += len(m.unknownFields)
	return n
}

func (m *GetBusInfoRequest) SizeVT() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	n += len(m.unknownFields)
	return n
}

func (m *GetBusInfoResponse) SizeVT() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if len(m.RunningControllers) > 0 {
		for _, e := range m.RunningControllers {
			l = e.SizeVT()
			n += 1 + l + protobuf_go_lite.SizeOfVarint(uint64(l))
		}
	}
	if len(m.RunningDirectives) > 0 {
		for _, e := range m.RunningDirectives {
			l = e.SizeVT()
			n += 1 + l + protobuf_go_lite.SizeOfVarint(uint64(l))
		}
	}
	n += len(m.unknownFields)
	return n
}

func (x *Config) MarshalProtoText() string {
	var sb strings.Builder
	sb.WriteString("Config {")
	if x.EnableExecController != false {
		if sb.Len() > 8 {
			sb.WriteString(" ")
		}
		sb.WriteString("enable_exec_controller: ")
		sb.WriteString(strconv.FormatBool(x.EnableExecController))
	}
	sb.WriteString("}")
	return sb.String()
}

func (x *Config) String() string {
	return x.MarshalProtoText()
}
func (x *GetBusInfoRequest) MarshalProtoText() string {
	var sb strings.Builder
	sb.WriteString("GetBusInfoRequest {")
	sb.WriteString("}")
	return sb.String()
}

func (x *GetBusInfoRequest) String() string {
	return x.MarshalProtoText()
}
func (x *GetBusInfoResponse) MarshalProtoText() string {
	var sb strings.Builder
	sb.WriteString("GetBusInfoResponse {")
	if len(x.RunningControllers) > 0 {
		if sb.Len() > 20 {
			sb.WriteString(" ")
		}
		sb.WriteString("running_controllers: [")
		for i, v := range x.RunningControllers {
			if i > 0 {
				sb.WriteString(", ")
			}
			sb.WriteString(v.MarshalProtoText())
		}
		sb.WriteString("]")
	}
	if len(x.RunningDirectives) > 0 {
		if sb.Len() > 20 {
			sb.WriteString(" ")
		}
		sb.WriteString("running_directives: [")
		for i, v := range x.RunningDirectives {
			if i > 0 {
				sb.WriteString(", ")
			}
			sb.WriteString(v.MarshalProtoText())
		}
		sb.WriteString("]")
	}
	sb.WriteString("}")
	return sb.String()
}

func (x *GetBusInfoResponse) String() string {
	return x.MarshalProtoText()
}
func (m *Config) UnmarshalVT(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return protobuf_go_lite.ErrIntOverflow
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: Config: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: Config: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field EnableExecController", wireType)
			}
			var v int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return protobuf_go_lite.ErrIntOverflow
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				v |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.EnableExecController = bool(v != 0)
		default:
			iNdEx = preIndex
			skippy, err := protobuf_go_lite.Skip(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return protobuf_go_lite.ErrInvalidLength
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *GetBusInfoRequest) UnmarshalVT(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return protobuf_go_lite.ErrIntOverflow
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: GetBusInfoRequest: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: GetBusInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		default:
			iNdEx = preIndex
			skippy, err := protobuf_go_lite.Skip(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return protobuf_go_lite.ErrInvalidLength
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *GetBusInfoResponse) UnmarshalVT(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return protobuf_go_lite.ErrIntOverflow
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: GetBusInfoResponse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: GetBusInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field RunningControllers", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return protobuf_go_lite.ErrIntOverflow
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return protobuf_go_lite.ErrInvalidLength
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return protobuf_go_lite.ErrInvalidLength
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.RunningControllers = append(m.RunningControllers, &controller.Info{})
			if err := m.RunningControllers[len(m.RunningControllers)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field RunningDirectives", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return protobuf_go_lite.ErrIntOverflow
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return protobuf_go_lite.ErrInvalidLength
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return protobuf_go_lite.ErrInvalidLength
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.RunningDirectives = append(m.RunningDirectives, &directive.DirectiveState{})
			if err := m.RunningDirectives[len(m.RunningDirectives)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := protobuf_go_lite.Skip(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return protobuf_go_lite.ErrInvalidLength
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
