//go:build vtprotobuf
// +build vtprotobuf

// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
// protoc-gen-go-vtproto version: v0.6.1-0.20250313105119-ba97887b0a25
// source: workloadapi/workload.proto

package workloadapi

import (
	protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
	anypb "github.com/planetscale/vtprotobuf/types/known/anypb"
	wrapperspb "github.com/planetscale/vtprotobuf/types/known/wrapperspb"
	proto "google.golang.org/protobuf/proto"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

func (this *Address) EqualVT(that *Address) bool {
	if this == that {
		return true
	} else if this == nil || that == nil {
		return false
	}
	if this.Type == nil && that.Type != nil {
		return false
	} else if this.Type != nil {
		if that.Type == nil {
			return false
		}
		if !this.Type.(interface{ EqualVT(isAddress_Type) bool }).EqualVT(that.Type) {
			return false
		}
	}
	return string(this.unknownFields) == string(that.unknownFields)
}

func (this *Address) EqualMessageVT(thatMsg proto.Message) bool {
	that, ok := thatMsg.(*Address)
	if !ok {
		return false
	}
	return this.EqualVT(that)
}
func (this *Address_Workload) EqualVT(thatIface isAddress_Type) bool {
	that, ok := thatIface.(*Address_Workload)
	if !ok {
		return false
	}
	if this == that {
		return true
	}
	if this == nil && that != nil || this != nil && that == nil {
		return false
	}
	if p, q := this.Workload, that.Workload; p != q {
		if p == nil {
			p = &Workload{}
		}
		if q == nil {
			q = &Workload{}
		}
		if !p.EqualVT(q) {
			return false
		}
	}
	return true
}

func (this *Address_Service) EqualVT(thatIface isAddress_Type) bool {
	that, ok := thatIface.(*Address_Service)
	if !ok {
		return false
	}
	if this == that {
		return true
	}
	if this == nil && that != nil || this != nil && that == nil {
		return false
	}
	if p, q := this.Service, that.Service; p != q {
		if p == nil {
			p = &Service{}
		}
		if q == nil {
			q = &Service{}
		}
		if !p.EqualVT(q) {
			return false
		}
	}
	return true
}

func (this *Service) EqualVT(that *Service) bool {
	if this == that {
		return true
	} else if this == nil || that == nil {
		return false
	}
	if this.Name != that.Name {
		return false
	}
	if this.Namespace != that.Namespace {
		return false
	}
	if this.Hostname != that.Hostname {
		return false
	}
	if len(this.Addresses) != len(that.Addresses) {
		return false
	}
	for i, vx := range this.Addresses {
		vy := that.Addresses[i]
		if p, q := vx, vy; p != q {
			if p == nil {
				p = &NetworkAddress{}
			}
			if q == nil {
				q = &NetworkAddress{}
			}
			if !p.EqualVT(q) {
				return false
			}
		}
	}
	if len(this.Ports) != len(that.Ports) {
		return false
	}
	for i, vx := range this.Ports {
		vy := that.Ports[i]
		if p, q := vx, vy; p != q {
			if p == nil {
				p = &Port{}
			}
			if q == nil {
				q = &Port{}
			}
			if !p.EqualVT(q) {
				return false
			}
		}
	}
	if len(this.SubjectAltNames) != len(that.SubjectAltNames) {
		return false
	}
	for i, vx := range this.SubjectAltNames {
		vy := that.SubjectAltNames[i]
		if vx != vy {
			return false
		}
	}
	if !this.Waypoint.EqualVT(that.Waypoint) {
		return false
	}
	if !this.LoadBalancing.EqualVT(that.LoadBalancing) {
		return false
	}
	if this.IpFamilies != that.IpFamilies {
		return false
	}
	if len(this.Extensions) != len(that.Extensions) {
		return false
	}
	for i, vx := range this.Extensions {
		vy := that.Extensions[i]
		if p, q := vx, vy; p != q {
			if p == nil {
				p = &Extension{}
			}
			if q == nil {
				q = &Extension{}
			}
			if !p.EqualVT(q) {
				return false
			}
		}
	}
	return string(this.unknownFields) == string(that.unknownFields)
}

func (this *Service) EqualMessageVT(thatMsg proto.Message) bool {
	that, ok := thatMsg.(*Service)
	if !ok {
		return false
	}
	return this.EqualVT(that)
}
func (this *LoadBalancing) EqualVT(that *LoadBalancing) bool {
	if this == that {
		return true
	} else if this == nil || that == nil {
		return false
	}
	if len(this.RoutingPreference) != len(that.RoutingPreference) {
		return false
	}
	for i, vx := range this.RoutingPreference {
		vy := that.RoutingPreference[i]
		if vx != vy {
			return false
		}
	}
	if this.Mode != that.Mode {
		return false
	}
	if this.HealthPolicy != that.HealthPolicy {
		return false
	}
	return string(this.unknownFields) == string(that.unknownFields)
}

func (this *LoadBalancing) EqualMessageVT(thatMsg proto.Message) bool {
	that, ok := thatMsg.(*LoadBalancing)
	if !ok {
		return false
	}
	return this.EqualVT(that)
}
func (this *Workload) EqualVT(that *Workload) bool {
	if this == that {
		return true
	} else if this == nil || that == nil {
		return false
	}
	if this.Name != that.Name {
		return false
	}
	if this.Namespace != that.Namespace {
		return false
	}
	if len(this.Addresses) != len(that.Addresses) {
		return false
	}
	for i, vx := range this.Addresses {
		vy := that.Addresses[i]
		if string(vx) != string(vy) {
			return false
		}
	}
	if this.Network != that.Network {
		return false
	}
	if this.TunnelProtocol != that.TunnelProtocol {
		return false
	}
	if this.TrustDomain != that.TrustDomain {
		return false
	}
	if this.ServiceAccount != that.ServiceAccount {
		return false
	}
	if !this.Waypoint.EqualVT(that.Waypoint) {
		return false
	}
	if this.Node != that.Node {
		return false
	}
	if this.CanonicalName != that.CanonicalName {
		return false
	}
	if this.CanonicalRevision != that.CanonicalRevision {
		return false
	}
	if this.WorkloadType != that.WorkloadType {
		return false
	}
	if this.WorkloadName != that.WorkloadName {
		return false
	}
	if this.NativeTunnel != that.NativeTunnel {
		return false
	}
	if len(this.AuthorizationPolicies) != len(that.AuthorizationPolicies) {
		return false
	}
	for i, vx := range this.AuthorizationPolicies {
		vy := that.AuthorizationPolicies[i]
		if vx != vy {
			return false
		}
	}
	if this.Status != that.Status {
		return false
	}
	if this.ClusterId != that.ClusterId {
		return false
	}
	if !this.NetworkGateway.EqualVT(that.NetworkGateway) {
		return false
	}
	if this.Uid != that.Uid {
		return false
	}
	if this.Hostname != that.Hostname {
		return false
	}
	if len(this.Services) != len(that.Services) {
		return false
	}
	for i, vx := range this.Services {
		vy, ok := that.Services[i]
		if !ok {
			return false
		}
		if p, q := vx, vy; p != q {
			if p == nil {
				p = &PortList{}
			}
			if q == nil {
				q = &PortList{}
			}
			if !p.EqualVT(q) {
				return false
			}
		}
	}
	if !this.ApplicationTunnel.EqualVT(that.ApplicationTunnel) {
		return false
	}
	if !this.Locality.EqualVT(that.Locality) {
		return false
	}
	if this.NetworkMode != that.NetworkMode {
		return false
	}
	if len(this.Extensions) != len(that.Extensions) {
		return false
	}
	for i, vx := range this.Extensions {
		vy := that.Extensions[i]
		if p, q := vx, vy; p != q {
			if p == nil {
				p = &Extension{}
			}
			if q == nil {
				q = &Extension{}
			}
			if !p.EqualVT(q) {
				return false
			}
		}
	}
	if !(*wrapperspb.UInt32Value)(this.Capacity).EqualVT((*wrapperspb.UInt32Value)(that.Capacity)) {
		return false
	}
	return string(this.unknownFields) == string(that.unknownFields)
}

func (this *Workload) EqualMessageVT(thatMsg proto.Message) bool {
	that, ok := thatMsg.(*Workload)
	if !ok {
		return false
	}
	return this.EqualVT(that)
}
func (this *Locality) EqualVT(that *Locality) bool {
	if this == that {
		return true
	} else if this == nil || that == nil {
		return false
	}
	if this.Region != that.Region {
		return false
	}
	if this.Zone != that.Zone {
		return false
	}
	if this.Subzone != that.Subzone {
		return false
	}
	return string(this.unknownFields) == string(that.unknownFields)
}

func (this *Locality) EqualMessageVT(thatMsg proto.Message) bool {
	that, ok := thatMsg.(*Locality)
	if !ok {
		return false
	}
	return this.EqualVT(that)
}
func (this *PortList) EqualVT(that *PortList) bool {
	if this == that {
		return true
	} else if this == nil || that == nil {
		return false
	}
	if len(this.Ports) != len(that.Ports) {
		return false
	}
	for i, vx := range this.Ports {
		vy := that.Ports[i]
		if p, q := vx, vy; p != q {
			if p == nil {
				p = &Port{}
			}
			if q == nil {
				q = &Port{}
			}
			if !p.EqualVT(q) {
				return false
			}
		}
	}
	return string(this.unknownFields) == string(that.unknownFields)
}

func (this *PortList) EqualMessageVT(thatMsg proto.Message) bool {
	that, ok := thatMsg.(*PortList)
	if !ok {
		return false
	}
	return this.EqualVT(that)
}
func (this *Port) EqualVT(that *Port) bool {
	if this == that {
		return true
	} else if this == nil || that == nil {
		return false
	}
	if this.ServicePort != that.ServicePort {
		return false
	}
	if this.TargetPort != that.TargetPort {
		return false
	}
	return string(this.unknownFields) == string(that.unknownFields)
}

func (this *Port) EqualMessageVT(thatMsg proto.Message) bool {
	that, ok := thatMsg.(*Port)
	if !ok {
		return false
	}
	return this.EqualVT(that)
}
func (this *ApplicationTunnel) EqualVT(that *ApplicationTunnel) bool {
	if this == that {
		return true
	} else if this == nil || that == nil {
		return false
	}
	if this.Protocol != that.Protocol {
		return false
	}
	if this.Port != that.Port {
		return false
	}
	return string(this.unknownFields) == string(that.unknownFields)
}

func (this *ApplicationTunnel) EqualMessageVT(thatMsg proto.Message) bool {
	that, ok := thatMsg.(*ApplicationTunnel)
	if !ok {
		return false
	}
	return this.EqualVT(that)
}
func (this *GatewayAddress) EqualVT(that *GatewayAddress) bool {
	if this == that {
		return true
	} else if this == nil || that == nil {
		return false
	}
	if this.Destination == nil && that.Destination != nil {
		return false
	} else if this.Destination != nil {
		if that.Destination == nil {
			return false
		}
		if !this.Destination.(interface {
			EqualVT(isGatewayAddress_Destination) bool
		}).EqualVT(that.Destination) {
			return false
		}
	}
	if this.HboneMtlsPort != that.HboneMtlsPort {
		return false
	}
	return string(this.unknownFields) == string(that.unknownFields)
}

func (this *GatewayAddress) EqualMessageVT(thatMsg proto.Message) bool {
	that, ok := thatMsg.(*GatewayAddress)
	if !ok {
		return false
	}
	return this.EqualVT(that)
}
func (this *GatewayAddress_Hostname) EqualVT(thatIface isGatewayAddress_Destination) bool {
	that, ok := thatIface.(*GatewayAddress_Hostname)
	if !ok {
		return false
	}
	if this == that {
		return true
	}
	if this == nil && that != nil || this != nil && that == nil {
		return false
	}
	if p, q := this.Hostname, that.Hostname; p != q {
		if p == nil {
			p = &NamespacedHostname{}
		}
		if q == nil {
			q = &NamespacedHostname{}
		}
		if !p.EqualVT(q) {
			return false
		}
	}
	return true
}

func (this *GatewayAddress_Address) EqualVT(thatIface isGatewayAddress_Destination) bool {
	that, ok := thatIface.(*GatewayAddress_Address)
	if !ok {
		return false
	}
	if this == that {
		return true
	}
	if this == nil && that != nil || this != nil && that == nil {
		return false
	}
	if p, q := this.Address, that.Address; p != q {
		if p == nil {
			p = &NetworkAddress{}
		}
		if q == nil {
			q = &NetworkAddress{}
		}
		if !p.EqualVT(q) {
			return false
		}
	}
	return true
}

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

func (this *NetworkAddress) EqualMessageVT(thatMsg proto.Message) bool {
	that, ok := thatMsg.(*NetworkAddress)
	if !ok {
		return false
	}
	return this.EqualVT(that)
}
func (this *NamespacedHostname) EqualVT(that *NamespacedHostname) bool {
	if this == that {
		return true
	} else if this == nil || that == nil {
		return false
	}
	if this.Namespace != that.Namespace {
		return false
	}
	if this.Hostname != that.Hostname {
		return false
	}
	return string(this.unknownFields) == string(that.unknownFields)
}

func (this *NamespacedHostname) EqualMessageVT(thatMsg proto.Message) bool {
	that, ok := thatMsg.(*NamespacedHostname)
	if !ok {
		return false
	}
	return this.EqualVT(that)
}
func (this *Extension) EqualVT(that *Extension) bool {
	if this == that {
		return true
	} else if this == nil || that == nil {
		return false
	}
	if this.Name != that.Name {
		return false
	}
	if !(*anypb.Any)(this.Config).EqualVT((*anypb.Any)(that.Config)) {
		return false
	}
	return string(this.unknownFields) == string(that.unknownFields)
}

func (this *Extension) EqualMessageVT(thatMsg proto.Message) bool {
	that, ok := thatMsg.(*Extension)
	if !ok {
		return false
	}
	return this.EqualVT(that)
}
func (m *Address) MarshalVTStrict() (dAtA []byte, err error) {
	if m == nil {
		return nil, nil
	}
	size := m.SizeVT()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *Address) MarshalToVTStrict(dAtA []byte) (int, error) {
	size := m.SizeVT()
	return m.MarshalToSizedBufferVTStrict(dAtA[:size])
}

func (m *Address) MarshalToSizedBufferVTStrict(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 msg, ok := m.Type.(*Address_Service); ok {
		size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
	}
	if msg, ok := m.Type.(*Address_Workload); ok {
		size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
	}
	return len(dAtA) - i, nil
}

func (m *Address_Workload) MarshalToVTStrict(dAtA []byte) (int, error) {
	size := m.SizeVT()
	return m.MarshalToSizedBufferVTStrict(dAtA[:size])
}

func (m *Address_Workload) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
	i := len(dAtA)
	if m.Workload != nil {
		size, err := m.Workload.MarshalToSizedBufferVTStrict(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
		i--
		dAtA[i] = 0xa
	} else {
		i = protohelpers.EncodeVarint(dAtA, i, 0)
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}
func (m *Address_Service) MarshalToVTStrict(dAtA []byte) (int, error) {
	size := m.SizeVT()
	return m.MarshalToSizedBufferVTStrict(dAtA[:size])
}

func (m *Address_Service) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
	i := len(dAtA)
	if m.Service != nil {
		size, err := m.Service.MarshalToSizedBufferVTStrict(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
		i--
		dAtA[i] = 0x12
	} else {
		i = protohelpers.EncodeVarint(dAtA, i, 0)
		i--
		dAtA[i] = 0x12
	}
	return len(dAtA) - i, nil
}
func (m *Service) MarshalVTStrict() (dAtA []byte, err error) {
	if m == nil {
		return nil, nil
	}
	size := m.SizeVT()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *Service) MarshalToVTStrict(dAtA []byte) (int, error) {
	size := m.SizeVT()
	return m.MarshalToSizedBufferVTStrict(dAtA[:size])
}

func (m *Service) MarshalToSizedBufferVTStrict(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.Extensions) > 0 {
		for iNdEx := len(m.Extensions) - 1; iNdEx >= 0; iNdEx-- {
			size, err := m.Extensions[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
			i--
			dAtA[i] = 0x52
		}
	}
	if m.IpFamilies != 0 {
		i = protohelpers.EncodeVarint(dAtA, i, uint64(m.IpFamilies))
		i--
		dAtA[i] = 0x48
	}
	if m.LoadBalancing != nil {
		size, err := m.LoadBalancing.MarshalToSizedBufferVTStrict(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
		i--
		dAtA[i] = 0x42
	}
	if m.Waypoint != nil {
		size, err := m.Waypoint.MarshalToSizedBufferVTStrict(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
		i--
		dAtA[i] = 0x3a
	}
	if len(m.SubjectAltNames) > 0 {
		for iNdEx := len(m.SubjectAltNames) - 1; iNdEx >= 0; iNdEx-- {
			i -= len(m.SubjectAltNames[iNdEx])
			copy(dAtA[i:], m.SubjectAltNames[iNdEx])
			i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SubjectAltNames[iNdEx])))
			i--
			dAtA[i] = 0x32
		}
	}
	if len(m.Ports) > 0 {
		for iNdEx := len(m.Ports) - 1; iNdEx >= 0; iNdEx-- {
			size, err := m.Ports[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
			i--
			dAtA[i] = 0x2a
		}
	}
	if len(m.Addresses) > 0 {
		for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- {
			size, err := m.Addresses[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
			i--
			dAtA[i] = 0x22
		}
	}
	if len(m.Hostname) > 0 {
		i -= len(m.Hostname)
		copy(dAtA[i:], m.Hostname)
		i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Hostname)))
		i--
		dAtA[i] = 0x1a
	}
	if len(m.Namespace) > 0 {
		i -= len(m.Namespace)
		copy(dAtA[i:], m.Namespace)
		i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Namespace)))
		i--
		dAtA[i] = 0x12
	}
	if len(m.Name) > 0 {
		i -= len(m.Name)
		copy(dAtA[i:], m.Name)
		i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

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

func (m *LoadBalancing) MarshalToVTStrict(dAtA []byte) (int, error) {
	size := m.SizeVT()
	return m.MarshalToSizedBufferVTStrict(dAtA[:size])
}

func (m *LoadBalancing) MarshalToSizedBufferVTStrict(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.HealthPolicy != 0 {
		i = protohelpers.EncodeVarint(dAtA, i, uint64(m.HealthPolicy))
		i--
		dAtA[i] = 0x18
	}
	if m.Mode != 0 {
		i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Mode))
		i--
		dAtA[i] = 0x10
	}
	if len(m.RoutingPreference) > 0 {
		var pksize2 int
		for _, num := range m.RoutingPreference {
			pksize2 += protohelpers.SizeOfVarint(uint64(num))
		}
		i -= pksize2
		j1 := i
		for _, num1 := range m.RoutingPreference {
			num := uint64(num1)
			for num >= 1<<7 {
				dAtA[j1] = uint8(uint64(num)&0x7f | 0x80)
				num >>= 7
				j1++
			}
			dAtA[j1] = uint8(num)
			j1++
		}
		i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize2))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

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

func (m *Workload) MarshalToVTStrict(dAtA []byte) (int, error) {
	size := m.SizeVT()
	return m.MarshalToSizedBufferVTStrict(dAtA[:size])
}

func (m *Workload) MarshalToSizedBufferVTStrict(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.Capacity != nil {
		size, err := (*wrapperspb.UInt32Value)(m.Capacity).MarshalToSizedBufferVTStrict(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
		i--
		dAtA[i] = 0x1
		i--
		dAtA[i] = 0xda
	}
	if len(m.Extensions) > 0 {
		for iNdEx := len(m.Extensions) - 1; iNdEx >= 0; iNdEx-- {
			size, err := m.Extensions[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
			i--
			dAtA[i] = 0x1
			i--
			dAtA[i] = 0xd2
		}
	}
	if m.NetworkMode != 0 {
		i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NetworkMode))
		i--
		dAtA[i] = 0x1
		i--
		dAtA[i] = 0xc8
	}
	if m.Locality != nil {
		size, err := m.Locality.MarshalToSizedBufferVTStrict(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
		i--
		dAtA[i] = 0x1
		i--
		dAtA[i] = 0xc2
	}
	if m.ApplicationTunnel != nil {
		size, err := m.ApplicationTunnel.MarshalToSizedBufferVTStrict(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
		i--
		dAtA[i] = 0x1
		i--
		dAtA[i] = 0xba
	}
	if len(m.Services) > 0 {
		for k := range m.Services {
			v := m.Services[k]
			baseI := i
			size, err := v.MarshalToSizedBufferVTStrict(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
			i--
			dAtA[i] = 0x12
			i -= len(k)
			copy(dAtA[i:], k)
			i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k)))
			i--
			dAtA[i] = 0xa
			i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i))
			i--
			dAtA[i] = 0x1
			i--
			dAtA[i] = 0xb2
		}
	}
	if len(m.Hostname) > 0 {
		i -= len(m.Hostname)
		copy(dAtA[i:], m.Hostname)
		i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Hostname)))
		i--
		dAtA[i] = 0x1
		i--
		dAtA[i] = 0xaa
	}
	if len(m.Uid) > 0 {
		i -= len(m.Uid)
		copy(dAtA[i:], m.Uid)
		i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Uid)))
		i--
		dAtA[i] = 0x1
		i--
		dAtA[i] = 0xa2
	}
	if m.NetworkGateway != nil {
		size, err := m.NetworkGateway.MarshalToSizedBufferVTStrict(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
		i--
		dAtA[i] = 0x1
		i--
		dAtA[i] = 0x9a
	}
	if len(m.ClusterId) > 0 {
		i -= len(m.ClusterId)
		copy(dAtA[i:], m.ClusterId)
		i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClusterId)))
		i--
		dAtA[i] = 0x1
		i--
		dAtA[i] = 0x92
	}
	if m.Status != 0 {
		i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Status))
		i--
		dAtA[i] = 0x1
		i--
		dAtA[i] = 0x88
	}
	if len(m.AuthorizationPolicies) > 0 {
		for iNdEx := len(m.AuthorizationPolicies) - 1; iNdEx >= 0; iNdEx-- {
			i -= len(m.AuthorizationPolicies[iNdEx])
			copy(dAtA[i:], m.AuthorizationPolicies[iNdEx])
			i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AuthorizationPolicies[iNdEx])))
			i--
			dAtA[i] = 0x1
			i--
			dAtA[i] = 0x82
		}
	}
	if m.NativeTunnel {
		i--
		if m.NativeTunnel {
			dAtA[i] = 1
		} else {
			dAtA[i] = 0
		}
		i--
		dAtA[i] = 0x70
	}
	if len(m.WorkloadName) > 0 {
		i -= len(m.WorkloadName)
		copy(dAtA[i:], m.WorkloadName)
		i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.WorkloadName)))
		i--
		dAtA[i] = 0x6a
	}
	if m.WorkloadType != 0 {
		i = protohelpers.EncodeVarint(dAtA, i, uint64(m.WorkloadType))
		i--
		dAtA[i] = 0x60
	}
	if len(m.CanonicalRevision) > 0 {
		i -= len(m.CanonicalRevision)
		copy(dAtA[i:], m.CanonicalRevision)
		i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.CanonicalRevision)))
		i--
		dAtA[i] = 0x5a
	}
	if len(m.CanonicalName) > 0 {
		i -= len(m.CanonicalName)
		copy(dAtA[i:], m.CanonicalName)
		i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.CanonicalName)))
		i--
		dAtA[i] = 0x52
	}
	if len(m.Node) > 0 {
		i -= len(m.Node)
		copy(dAtA[i:], m.Node)
		i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Node)))
		i--
		dAtA[i] = 0x4a
	}
	if m.Waypoint != nil {
		size, err := m.Waypoint.MarshalToSizedBufferVTStrict(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
		i--
		dAtA[i] = 0x42
	}
	if len(m.ServiceAccount) > 0 {
		i -= len(m.ServiceAccount)
		copy(dAtA[i:], m.ServiceAccount)
		i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ServiceAccount)))
		i--
		dAtA[i] = 0x3a
	}
	if len(m.TrustDomain) > 0 {
		i -= len(m.TrustDomain)
		copy(dAtA[i:], m.TrustDomain)
		i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.TrustDomain)))
		i--
		dAtA[i] = 0x32
	}
	if m.TunnelProtocol != 0 {
		i = protohelpers.EncodeVarint(dAtA, i, uint64(m.TunnelProtocol))
		i--
		dAtA[i] = 0x28
	}
	if len(m.Network) > 0 {
		i -= len(m.Network)
		copy(dAtA[i:], m.Network)
		i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Network)))
		i--
		dAtA[i] = 0x22
	}
	if len(m.Addresses) > 0 {
		for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- {
			i -= len(m.Addresses[iNdEx])
			copy(dAtA[i:], m.Addresses[iNdEx])
			i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Addresses[iNdEx])))
			i--
			dAtA[i] = 0x1a
		}
	}
	if len(m.Namespace) > 0 {
		i -= len(m.Namespace)
		copy(dAtA[i:], m.Namespace)
		i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Namespace)))
		i--
		dAtA[i] = 0x12
	}
	if len(m.Name) > 0 {
		i -= len(m.Name)
		copy(dAtA[i:], m.Name)
		i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

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

func (m *Locality) MarshalToVTStrict(dAtA []byte) (int, error) {
	size := m.SizeVT()
	return m.MarshalToSizedBufferVTStrict(dAtA[:size])
}

func (m *Locality) MarshalToSizedBufferVTStrict(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.Subzone) > 0 {
		i -= len(m.Subzone)
		copy(dAtA[i:], m.Subzone)
		i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Subzone)))
		i--
		dAtA[i] = 0x1a
	}
	if len(m.Zone) > 0 {
		i -= len(m.Zone)
		copy(dAtA[i:], m.Zone)
		i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Zone)))
		i--
		dAtA[i] = 0x12
	}
	if len(m.Region) > 0 {
		i -= len(m.Region)
		copy(dAtA[i:], m.Region)
		i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Region)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

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

func (m *PortList) MarshalToVTStrict(dAtA []byte) (int, error) {
	size := m.SizeVT()
	return m.MarshalToSizedBufferVTStrict(dAtA[:size])
}

func (m *PortList) MarshalToSizedBufferVTStrict(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.Ports) > 0 {
		for iNdEx := len(m.Ports) - 1; iNdEx >= 0; iNdEx-- {
			size, err := m.Ports[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
			i--
			dAtA[i] = 0xa
		}
	}
	return len(dAtA) - i, nil
}

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

func (m *Port) MarshalToVTStrict(dAtA []byte) (int, error) {
	size := m.SizeVT()
	return m.MarshalToSizedBufferVTStrict(dAtA[:size])
}

func (m *Port) MarshalToSizedBufferVTStrict(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.TargetPort != 0 {
		i = protohelpers.EncodeVarint(dAtA, i, uint64(m.TargetPort))
		i--
		dAtA[i] = 0x10
	}
	if m.ServicePort != 0 {
		i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ServicePort))
		i--
		dAtA[i] = 0x8
	}
	return len(dAtA) - i, nil
}

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

func (m *ApplicationTunnel) MarshalToVTStrict(dAtA []byte) (int, error) {
	size := m.SizeVT()
	return m.MarshalToSizedBufferVTStrict(dAtA[:size])
}

func (m *ApplicationTunnel) MarshalToSizedBufferVTStrict(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.Port != 0 {
		i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Port))
		i--
		dAtA[i] = 0x10
	}
	if m.Protocol != 0 {
		i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Protocol))
		i--
		dAtA[i] = 0x8
	}
	return len(dAtA) - i, nil
}

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

func (m *GatewayAddress) MarshalToVTStrict(dAtA []byte) (int, error) {
	size := m.SizeVT()
	return m.MarshalToSizedBufferVTStrict(dAtA[:size])
}

func (m *GatewayAddress) MarshalToSizedBufferVTStrict(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.HboneMtlsPort != 0 {
		i = protohelpers.EncodeVarint(dAtA, i, uint64(m.HboneMtlsPort))
		i--
		dAtA[i] = 0x18
	}
	if msg, ok := m.Destination.(*GatewayAddress_Address); ok {
		size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
	}
	if msg, ok := m.Destination.(*GatewayAddress_Hostname); ok {
		size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
	}
	return len(dAtA) - i, nil
}

func (m *GatewayAddress_Hostname) MarshalToVTStrict(dAtA []byte) (int, error) {
	size := m.SizeVT()
	return m.MarshalToSizedBufferVTStrict(dAtA[:size])
}

func (m *GatewayAddress_Hostname) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
	i := len(dAtA)
	if m.Hostname != nil {
		size, err := m.Hostname.MarshalToSizedBufferVTStrict(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
		i--
		dAtA[i] = 0xa
	} else {
		i = protohelpers.EncodeVarint(dAtA, i, 0)
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}
func (m *GatewayAddress_Address) MarshalToVTStrict(dAtA []byte) (int, error) {
	size := m.SizeVT()
	return m.MarshalToSizedBufferVTStrict(dAtA[:size])
}

func (m *GatewayAddress_Address) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
	i := len(dAtA)
	if m.Address != nil {
		size, err := m.Address.MarshalToSizedBufferVTStrict(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
		i--
		dAtA[i] = 0x12
	} else {
		i = protohelpers.EncodeVarint(dAtA, i, 0)
		i--
		dAtA[i] = 0x12
	}
	return len(dAtA) - i, nil
}
func (m *NetworkAddress) MarshalVTStrict() (dAtA []byte, err error) {
	if m == nil {
		return nil, nil
	}
	size := m.SizeVT()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *NetworkAddress) MarshalToVTStrict(dAtA []byte) (int, error) {
	size := m.SizeVT()
	return m.MarshalToSizedBufferVTStrict(dAtA[:size])
}

func (m *NetworkAddress) MarshalToSizedBufferVTStrict(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.Address) > 0 {
		i -= len(m.Address)
		copy(dAtA[i:], m.Address)
		i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Address)))
		i--
		dAtA[i] = 0x12
	}
	if len(m.Network) > 0 {
		i -= len(m.Network)
		copy(dAtA[i:], m.Network)
		i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Network)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

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

func (m *NamespacedHostname) MarshalToVTStrict(dAtA []byte) (int, error) {
	size := m.SizeVT()
	return m.MarshalToSizedBufferVTStrict(dAtA[:size])
}

func (m *NamespacedHostname) MarshalToSizedBufferVTStrict(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.Hostname) > 0 {
		i -= len(m.Hostname)
		copy(dAtA[i:], m.Hostname)
		i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Hostname)))
		i--
		dAtA[i] = 0x12
	}
	if len(m.Namespace) > 0 {
		i -= len(m.Namespace)
		copy(dAtA[i:], m.Namespace)
		i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Namespace)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

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

func (m *Extension) MarshalToVTStrict(dAtA []byte) (int, error) {
	size := m.SizeVT()
	return m.MarshalToSizedBufferVTStrict(dAtA[:size])
}

func (m *Extension) MarshalToSizedBufferVTStrict(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.Config != nil {
		size, err := (*anypb.Any)(m.Config).MarshalToSizedBufferVTStrict(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
		i--
		dAtA[i] = 0x12
	}
	if len(m.Name) > 0 {
		i -= len(m.Name)
		copy(dAtA[i:], m.Name)
		i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *Address) SizeVT() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if vtmsg, ok := m.Type.(interface{ SizeVT() int }); ok {
		n += vtmsg.SizeVT()
	}
	n += len(m.unknownFields)
	return n
}

func (m *Address_Workload) SizeVT() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Workload != nil {
		l = m.Workload.SizeVT()
		n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
	} else {
		n += 2
	}
	return n
}
func (m *Address_Service) SizeVT() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Service != nil {
		l = m.Service.SizeVT()
		n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
	} else {
		n += 2
	}
	return n
}
func (m *Service) SizeVT() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.Name)
	if l > 0 {
		n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
	}
	l = len(m.Namespace)
	if l > 0 {
		n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
	}
	l = len(m.Hostname)
	if l > 0 {
		n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
	}
	if len(m.Addresses) > 0 {
		for _, e := range m.Addresses {
			l = e.SizeVT()
			n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
		}
	}
	if len(m.Ports) > 0 {
		for _, e := range m.Ports {
			l = e.SizeVT()
			n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
		}
	}
	if len(m.SubjectAltNames) > 0 {
		for _, s := range m.SubjectAltNames {
			l = len(s)
			n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
		}
	}
	if m.Waypoint != nil {
		l = m.Waypoint.SizeVT()
		n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
	}
	if m.LoadBalancing != nil {
		l = m.LoadBalancing.SizeVT()
		n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
	}
	if m.IpFamilies != 0 {
		n += 1 + protohelpers.SizeOfVarint(uint64(m.IpFamilies))
	}
	if len(m.Extensions) > 0 {
		for _, e := range m.Extensions {
			l = e.SizeVT()
			n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
		}
	}
	n += len(m.unknownFields)
	return n
}

func (m *LoadBalancing) SizeVT() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if len(m.RoutingPreference) > 0 {
		l = 0
		for _, e := range m.RoutingPreference {
			l += protohelpers.SizeOfVarint(uint64(e))
		}
		n += 1 + protohelpers.SizeOfVarint(uint64(l)) + l
	}
	if m.Mode != 0 {
		n += 1 + protohelpers.SizeOfVarint(uint64(m.Mode))
	}
	if m.HealthPolicy != 0 {
		n += 1 + protohelpers.SizeOfVarint(uint64(m.HealthPolicy))
	}
	n += len(m.unknownFields)
	return n
}

func (m *Workload) SizeVT() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.Name)
	if l > 0 {
		n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
	}
	l = len(m.Namespace)
	if l > 0 {
		n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
	}
	if len(m.Addresses) > 0 {
		for _, b := range m.Addresses {
			l = len(b)
			n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
		}
	}
	l = len(m.Network)
	if l > 0 {
		n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
	}
	if m.TunnelProtocol != 0 {
		n += 1 + protohelpers.SizeOfVarint(uint64(m.TunnelProtocol))
	}
	l = len(m.TrustDomain)
	if l > 0 {
		n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
	}
	l = len(m.ServiceAccount)
	if l > 0 {
		n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
	}
	if m.Waypoint != nil {
		l = m.Waypoint.SizeVT()
		n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
	}
	l = len(m.Node)
	if l > 0 {
		n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
	}
	l = len(m.CanonicalName)
	if l > 0 {
		n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
	}
	l = len(m.CanonicalRevision)
	if l > 0 {
		n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
	}
	if m.WorkloadType != 0 {
		n += 1 + protohelpers.SizeOfVarint(uint64(m.WorkloadType))
	}
	l = len(m.WorkloadName)
	if l > 0 {
		n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
	}
	if m.NativeTunnel {
		n += 2
	}
	if len(m.AuthorizationPolicies) > 0 {
		for _, s := range m.AuthorizationPolicies {
			l = len(s)
			n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
		}
	}
	if m.Status != 0 {
		n += 2 + protohelpers.SizeOfVarint(uint64(m.Status))
	}
	l = len(m.ClusterId)
	if l > 0 {
		n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
	}
	if m.NetworkGateway != nil {
		l = m.NetworkGateway.SizeVT()
		n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
	}
	l = len(m.Uid)
	if l > 0 {
		n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
	}
	l = len(m.Hostname)
	if l > 0 {
		n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
	}
	if len(m.Services) > 0 {
		for k, v := range m.Services {
			_ = k
			_ = v
			l = 0
			if v != nil {
				l = v.SizeVT()
			}
			l += 1 + protohelpers.SizeOfVarint(uint64(l))
			mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + l
			n += mapEntrySize + 2 + protohelpers.SizeOfVarint(uint64(mapEntrySize))
		}
	}
	if m.ApplicationTunnel != nil {
		l = m.ApplicationTunnel.SizeVT()
		n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
	}
	if m.Locality != nil {
		l = m.Locality.SizeVT()
		n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
	}
	if m.NetworkMode != 0 {
		n += 2 + protohelpers.SizeOfVarint(uint64(m.NetworkMode))
	}
	if len(m.Extensions) > 0 {
		for _, e := range m.Extensions {
			l = e.SizeVT()
			n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
		}
	}
	if m.Capacity != nil {
		l = (*wrapperspb.UInt32Value)(m.Capacity).SizeVT()
		n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
	}
	n += len(m.unknownFields)
	return n
}

func (m *Locality) SizeVT() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.Region)
	if l > 0 {
		n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
	}
	l = len(m.Zone)
	if l > 0 {
		n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
	}
	l = len(m.Subzone)
	if l > 0 {
		n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
	}
	n += len(m.unknownFields)
	return n
}

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

func (m *Port) SizeVT() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.ServicePort != 0 {
		n += 1 + protohelpers.SizeOfVarint(uint64(m.ServicePort))
	}
	if m.TargetPort != 0 {
		n += 1 + protohelpers.SizeOfVarint(uint64(m.TargetPort))
	}
	n += len(m.unknownFields)
	return n
}

func (m *ApplicationTunnel) SizeVT() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Protocol != 0 {
		n += 1 + protohelpers.SizeOfVarint(uint64(m.Protocol))
	}
	if m.Port != 0 {
		n += 1 + protohelpers.SizeOfVarint(uint64(m.Port))
	}
	n += len(m.unknownFields)
	return n
}

func (m *GatewayAddress) SizeVT() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if vtmsg, ok := m.Destination.(interface{ SizeVT() int }); ok {
		n += vtmsg.SizeVT()
	}
	if m.HboneMtlsPort != 0 {
		n += 1 + protohelpers.SizeOfVarint(uint64(m.HboneMtlsPort))
	}
	n += len(m.unknownFields)
	return n
}

func (m *GatewayAddress_Hostname) SizeVT() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Hostname != nil {
		l = m.Hostname.SizeVT()
		n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
	} else {
		n += 2
	}
	return n
}
func (m *GatewayAddress_Address) SizeVT() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Address != nil {
		l = m.Address.SizeVT()
		n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
	} else {
		n += 2
	}
	return n
}
func (m *NetworkAddress) SizeVT() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.Network)
	if l > 0 {
		n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
	}
	l = len(m.Address)
	if l > 0 {
		n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
	}
	n += len(m.unknownFields)
	return n
}

func (m *NamespacedHostname) SizeVT() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.Namespace)
	if l > 0 {
		n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
	}
	l = len(m.Hostname)
	if l > 0 {
		n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
	}
	n += len(m.unknownFields)
	return n
}

func (m *Extension) SizeVT() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.Name)
	if l > 0 {
		n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
	}
	if m.Config != nil {
		l = (*anypb.Any)(m.Config).SizeVT()
		n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
	}
	n += len(m.unknownFields)
	return n
}
