// Code generated by protoc-gen-go-hashpb. DO NOT EDIT.
// protoc-gen-go-hashpb v0.4.2

package auditv1

import (
	v1 "github.com/cerbos/cerbos/api/genpb/cerbos/engine/v1"
	v11 "github.com/cerbos/cerbos/api/genpb/cerbos/policy/v1"
	v12 "github.com/cerbos/cerbos/api/genpb/cerbos/schema/v1"
	protowire "google.golang.org/protobuf/encoding/protowire"
	structpb "google.golang.org/protobuf/types/known/structpb"
	timestamppb "google.golang.org/protobuf/types/known/timestamppb"
	hash "hash"
	maps "maps"
	math "math"
	slices "slices"
	unsafe "unsafe"
)

func cerbos_audit_v1_AccessLogEntry_hashpb_sum(m *AccessLogEntry, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["cerbos.audit.v1.AccessLogEntry.call_id"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetCallId()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetCallId()), len(m.GetCallId())))
	}
	if _, ok := ignore["cerbos.audit.v1.AccessLogEntry.timestamp"]; !ok {
		if m.GetTimestamp() != nil {
			google_protobuf_Timestamp_hashpb_sum(m.GetTimestamp(), hasher, ignore)
		}
	}
	if _, ok := ignore["cerbos.audit.v1.AccessLogEntry.peer"]; !ok {
		if m.GetPeer() != nil {
			cerbos_audit_v1_Peer_hashpb_sum(m.GetPeer(), hasher, ignore)
		}
	}
	if _, ok := ignore["cerbos.audit.v1.AccessLogEntry.metadata"]; !ok {
		if len(m.Metadata) > 0 {
			for _, k := range slices.Sorted(maps.Keys(m.Metadata)) {
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(k))))
				_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(k), len(k)))
				if m.Metadata[k] != nil {
					cerbos_audit_v1_MetaValues_hashpb_sum(m.Metadata[k], hasher, ignore)
				}
			}
		}
	}
	if _, ok := ignore["cerbos.audit.v1.AccessLogEntry.method"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetMethod()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetMethod()), len(m.GetMethod())))
	}
	if _, ok := ignore["cerbos.audit.v1.AccessLogEntry.status_code"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(m.GetStatusCode())))
	}
	if _, ok := ignore["cerbos.audit.v1.AccessLogEntry.oversized"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, protowire.EncodeBool(m.GetOversized())))
	}
	if _, ok := ignore["cerbos.audit.v1.AccessLogEntry.policy_source"]; !ok {
		if m.GetPolicySource() != nil {
			cerbos_audit_v1_PolicySource_hashpb_sum(m.GetPolicySource(), hasher, ignore)
		}
	}
}

func cerbos_audit_v1_AuditTrail_hashpb_sum(m *AuditTrail, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["cerbos.audit.v1.AuditTrail.effective_policies"]; !ok {
		if len(m.EffectivePolicies) > 0 {
			for _, k := range slices.Sorted(maps.Keys(m.EffectivePolicies)) {
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(k))))
				_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(k), len(k)))
				if m.EffectivePolicies[k] != nil {
					cerbos_policy_v1_SourceAttributes_hashpb_sum(m.EffectivePolicies[k], hasher, ignore)
				}
			}
		}
	}
}

func cerbos_audit_v1_DecisionLogEntry_CheckResources_hashpb_sum(m *DecisionLogEntry_CheckResources, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["cerbos.audit.v1.DecisionLogEntry.CheckResources.inputs"]; !ok {
		if len(m.Inputs) > 0 {
			for _, v := range m.Inputs {
				if v != nil {
					cerbos_engine_v1_CheckInput_hashpb_sum(v, hasher, ignore)
				}
			}
		}
	}
	if _, ok := ignore["cerbos.audit.v1.DecisionLogEntry.CheckResources.outputs"]; !ok {
		if len(m.Outputs) > 0 {
			for _, v := range m.Outputs {
				if v != nil {
					cerbos_engine_v1_CheckOutput_hashpb_sum(v, hasher, ignore)
				}
			}
		}
	}
	if _, ok := ignore["cerbos.audit.v1.DecisionLogEntry.CheckResources.error"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetError()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetError()), len(m.GetError())))
	}
}

func cerbos_audit_v1_DecisionLogEntry_PlanResources_hashpb_sum(m *DecisionLogEntry_PlanResources, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["cerbos.audit.v1.DecisionLogEntry.PlanResources.input"]; !ok {
		if m.GetInput() != nil {
			cerbos_engine_v1_PlanResourcesInput_hashpb_sum(m.GetInput(), hasher, ignore)
		}
	}
	if _, ok := ignore["cerbos.audit.v1.DecisionLogEntry.PlanResources.output"]; !ok {
		if m.GetOutput() != nil {
			cerbos_engine_v1_PlanResourcesOutput_hashpb_sum(m.GetOutput(), hasher, ignore)
		}
	}
	if _, ok := ignore["cerbos.audit.v1.DecisionLogEntry.PlanResources.error"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetError()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetError()), len(m.GetError())))
	}
}

func cerbos_audit_v1_DecisionLogEntry_hashpb_sum(m *DecisionLogEntry, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["cerbos.audit.v1.DecisionLogEntry.call_id"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetCallId()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetCallId()), len(m.GetCallId())))
	}
	if _, ok := ignore["cerbos.audit.v1.DecisionLogEntry.timestamp"]; !ok {
		if m.GetTimestamp() != nil {
			google_protobuf_Timestamp_hashpb_sum(m.GetTimestamp(), hasher, ignore)
		}
	}
	if _, ok := ignore["cerbos.audit.v1.DecisionLogEntry.peer"]; !ok {
		if m.GetPeer() != nil {
			cerbos_audit_v1_Peer_hashpb_sum(m.GetPeer(), hasher, ignore)
		}
	}
	if _, ok := ignore["cerbos.audit.v1.DecisionLogEntry.inputs"]; !ok {
		if len(m.Inputs) > 0 {
			for _, v := range m.Inputs {
				if v != nil {
					cerbos_engine_v1_CheckInput_hashpb_sum(v, hasher, ignore)
				}
			}
		}
	}
	if _, ok := ignore["cerbos.audit.v1.DecisionLogEntry.outputs"]; !ok {
		if len(m.Outputs) > 0 {
			for _, v := range m.Outputs {
				if v != nil {
					cerbos_engine_v1_CheckOutput_hashpb_sum(v, hasher, ignore)
				}
			}
		}
	}
	if _, ok := ignore["cerbos.audit.v1.DecisionLogEntry.error"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetError()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetError()), len(m.GetError())))
	}
	if m.Method != nil {
		if _, ok := ignore["cerbos.audit.v1.DecisionLogEntry.method"]; !ok {
			switch t := m.Method.(type) {
			case *DecisionLogEntry_CheckResources_:
				if t.CheckResources != nil {
					cerbos_audit_v1_DecisionLogEntry_CheckResources_hashpb_sum(t.CheckResources, hasher, ignore)
				}
			case *DecisionLogEntry_PlanResources_:
				if t.PlanResources != nil {
					cerbos_audit_v1_DecisionLogEntry_PlanResources_hashpb_sum(t.PlanResources, hasher, ignore)
				}
			}
		}
	}
	if _, ok := ignore["cerbos.audit.v1.DecisionLogEntry.metadata"]; !ok {
		if len(m.Metadata) > 0 {
			for _, k := range slices.Sorted(maps.Keys(m.Metadata)) {
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(k))))
				_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(k), len(k)))
				if m.Metadata[k] != nil {
					cerbos_audit_v1_MetaValues_hashpb_sum(m.Metadata[k], hasher, ignore)
				}
			}
		}
	}
	if _, ok := ignore["cerbos.audit.v1.DecisionLogEntry.audit_trail"]; !ok {
		if m.GetAuditTrail() != nil {
			cerbos_audit_v1_AuditTrail_hashpb_sum(m.GetAuditTrail(), hasher, ignore)
		}
	}
	if _, ok := ignore["cerbos.audit.v1.DecisionLogEntry.oversized"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, protowire.EncodeBool(m.GetOversized())))
	}
	if _, ok := ignore["cerbos.audit.v1.DecisionLogEntry.policy_source"]; !ok {
		if m.GetPolicySource() != nil {
			cerbos_audit_v1_PolicySource_hashpb_sum(m.GetPolicySource(), hasher, ignore)
		}
	}
}

func cerbos_audit_v1_MetaValues_hashpb_sum(m *MetaValues, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["cerbos.audit.v1.MetaValues.values"]; !ok {
		if len(m.Values) > 0 {
			for _, v := range m.Values {
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(v))))
				_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(v), len(v)))
			}
		}
	}
}

func cerbos_audit_v1_Peer_hashpb_sum(m *Peer, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["cerbos.audit.v1.Peer.address"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetAddress()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetAddress()), len(m.GetAddress())))
	}
	if _, ok := ignore["cerbos.audit.v1.Peer.auth_info"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetAuthInfo()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetAuthInfo()), len(m.GetAuthInfo())))
	}
	if _, ok := ignore["cerbos.audit.v1.Peer.user_agent"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetUserAgent()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetUserAgent()), len(m.GetUserAgent())))
	}
	if _, ok := ignore["cerbos.audit.v1.Peer.forwarded_for"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetForwardedFor()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetForwardedFor()), len(m.GetForwardedFor())))
	}
}

func cerbos_audit_v1_PolicySource_Blob_hashpb_sum(m *PolicySource_Blob, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["cerbos.audit.v1.PolicySource.Blob.bucket_url"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetBucketUrl()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetBucketUrl()), len(m.GetBucketUrl())))
	}
	if _, ok := ignore["cerbos.audit.v1.PolicySource.Blob.prefix"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetPrefix()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetPrefix()), len(m.GetPrefix())))
	}
}

func cerbos_audit_v1_PolicySource_Database_hashpb_sum(m *PolicySource_Database, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["cerbos.audit.v1.PolicySource.Database.driver"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(m.GetDriver())))
	}
}

func cerbos_audit_v1_PolicySource_Disk_hashpb_sum(m *PolicySource_Disk, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["cerbos.audit.v1.PolicySource.Disk.directory"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetDirectory()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetDirectory()), len(m.GetDirectory())))
	}
}

func cerbos_audit_v1_PolicySource_EmbeddedPDP_hashpb_sum(m *PolicySource_EmbeddedPDP, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["cerbos.audit.v1.PolicySource.EmbeddedPDP.url"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetUrl()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetUrl()), len(m.GetUrl())))
	}
	if _, ok := ignore["cerbos.audit.v1.PolicySource.EmbeddedPDP.commit_hash"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetCommitHash()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetCommitHash()), len(m.GetCommitHash())))
	}
	if _, ok := ignore["cerbos.audit.v1.PolicySource.EmbeddedPDP.built_at"]; !ok {
		if m.GetBuiltAt() != nil {
			google_protobuf_Timestamp_hashpb_sum(m.GetBuiltAt(), hasher, ignore)
		}
	}
}

func cerbos_audit_v1_PolicySource_Git_hashpb_sum(m *PolicySource_Git, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["cerbos.audit.v1.PolicySource.Git.repository_url"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetRepositoryUrl()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetRepositoryUrl()), len(m.GetRepositoryUrl())))
	}
	if _, ok := ignore["cerbos.audit.v1.PolicySource.Git.branch"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetBranch()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetBranch()), len(m.GetBranch())))
	}
	if _, ok := ignore["cerbos.audit.v1.PolicySource.Git.subdirectory"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetSubdirectory()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetSubdirectory()), len(m.GetSubdirectory())))
	}
}

func cerbos_audit_v1_PolicySource_Hub_LocalBundle_hashpb_sum(m *PolicySource_Hub_LocalBundle, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["cerbos.audit.v1.PolicySource.Hub.LocalBundle.path"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetPath()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetPath()), len(m.GetPath())))
	}
}

func cerbos_audit_v1_PolicySource_Hub_hashpb_sum(m *PolicySource_Hub, hasher hash.Hash, ignore map[string]struct{}) {
	if m.Source != nil {
		if _, ok := ignore["cerbos.audit.v1.PolicySource.Hub.source"]; !ok {
			switch t := m.Source.(type) {
			case *PolicySource_Hub_Label:
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(t.Label))))
				_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(t.Label), len(t.Label)))
			case *PolicySource_Hub_DeploymentId:
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(t.DeploymentId))))
				_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(t.DeploymentId), len(t.DeploymentId)))
			case *PolicySource_Hub_PlaygroundId:
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(t.PlaygroundId))))
				_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(t.PlaygroundId), len(t.PlaygroundId)))
			case *PolicySource_Hub_LocalBundle_:
				if t.LocalBundle != nil {
					cerbos_audit_v1_PolicySource_Hub_LocalBundle_hashpb_sum(t.LocalBundle, hasher, ignore)
				}
			}
		}
	}
}

func cerbos_audit_v1_PolicySource_hashpb_sum(m *PolicySource, hasher hash.Hash, ignore map[string]struct{}) {
	if m.Source != nil {
		if _, ok := ignore["cerbos.audit.v1.PolicySource.source"]; !ok {
			switch t := m.Source.(type) {
			case *PolicySource_Blob_:
				if t.Blob != nil {
					cerbos_audit_v1_PolicySource_Blob_hashpb_sum(t.Blob, hasher, ignore)
				}
			case *PolicySource_Database_:
				if t.Database != nil {
					cerbos_audit_v1_PolicySource_Database_hashpb_sum(t.Database, hasher, ignore)
				}
			case *PolicySource_Disk_:
				if t.Disk != nil {
					cerbos_audit_v1_PolicySource_Disk_hashpb_sum(t.Disk, hasher, ignore)
				}
			case *PolicySource_Git_:
				if t.Git != nil {
					cerbos_audit_v1_PolicySource_Git_hashpb_sum(t.Git, hasher, ignore)
				}
			case *PolicySource_Hub_:
				if t.Hub != nil {
					cerbos_audit_v1_PolicySource_Hub_hashpb_sum(t.Hub, hasher, ignore)
				}
			case *PolicySource_EmbeddedPdp:
				if t.EmbeddedPdp != nil {
					cerbos_audit_v1_PolicySource_EmbeddedPDP_hashpb_sum(t.EmbeddedPdp, hasher, ignore)
				}
			}
		}
	}
}

func cerbos_engine_v1_AuxData_hashpb_sum(m *v1.AuxData, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["cerbos.engine.v1.AuxData.jwt"]; !ok {
		if len(m.Jwt) > 0 {
			for _, k := range slices.Sorted(maps.Keys(m.Jwt)) {
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(k))))
				_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(k), len(k)))
				if m.Jwt[k] != nil {
					google_protobuf_Value_hashpb_sum(m.Jwt[k], hasher, ignore)
				}
			}
		}
	}
}

func cerbos_engine_v1_CheckInput_hashpb_sum(m *v1.CheckInput, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["cerbos.engine.v1.CheckInput.request_id"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetRequestId()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetRequestId()), len(m.GetRequestId())))
	}
	if _, ok := ignore["cerbos.engine.v1.CheckInput.resource"]; !ok {
		if m.GetResource() != nil {
			cerbos_engine_v1_Resource_hashpb_sum(m.GetResource(), hasher, ignore)
		}
	}
	if _, ok := ignore["cerbos.engine.v1.CheckInput.principal"]; !ok {
		if m.GetPrincipal() != nil {
			cerbos_engine_v1_Principal_hashpb_sum(m.GetPrincipal(), hasher, ignore)
		}
	}
	if _, ok := ignore["cerbos.engine.v1.CheckInput.actions"]; !ok {
		if len(m.Actions) > 0 {
			for _, v := range m.Actions {
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(v))))
				_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(v), len(v)))
			}
		}
	}
	if _, ok := ignore["cerbos.engine.v1.CheckInput.aux_data"]; !ok {
		if m.GetAuxData() != nil {
			cerbos_engine_v1_AuxData_hashpb_sum(m.GetAuxData(), hasher, ignore)
		}
	}
}

func cerbos_engine_v1_CheckOutput_ActionEffect_hashpb_sum(m *v1.CheckOutput_ActionEffect, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["cerbos.engine.v1.CheckOutput.ActionEffect.effect"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(m.GetEffect())))
	}
	if _, ok := ignore["cerbos.engine.v1.CheckOutput.ActionEffect.policy"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetPolicy()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetPolicy()), len(m.GetPolicy())))
	}
	if _, ok := ignore["cerbos.engine.v1.CheckOutput.ActionEffect.scope"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetScope()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetScope()), len(m.GetScope())))
	}
}

func cerbos_engine_v1_CheckOutput_hashpb_sum(m *v1.CheckOutput, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["cerbos.engine.v1.CheckOutput.request_id"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetRequestId()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetRequestId()), len(m.GetRequestId())))
	}
	if _, ok := ignore["cerbos.engine.v1.CheckOutput.resource_id"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetResourceId()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetResourceId()), len(m.GetResourceId())))
	}
	if _, ok := ignore["cerbos.engine.v1.CheckOutput.actions"]; !ok {
		if len(m.Actions) > 0 {
			for _, k := range slices.Sorted(maps.Keys(m.Actions)) {
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(k))))
				_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(k), len(k)))
				if m.Actions[k] != nil {
					cerbos_engine_v1_CheckOutput_ActionEffect_hashpb_sum(m.Actions[k], hasher, ignore)
				}
			}
		}
	}
	if _, ok := ignore["cerbos.engine.v1.CheckOutput.effective_derived_roles"]; !ok {
		if len(m.EffectiveDerivedRoles) > 0 {
			for _, v := range m.EffectiveDerivedRoles {
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(v))))
				_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(v), len(v)))
			}
		}
	}
	if _, ok := ignore["cerbos.engine.v1.CheckOutput.validation_errors"]; !ok {
		if len(m.ValidationErrors) > 0 {
			for _, v := range m.ValidationErrors {
				if v != nil {
					cerbos_schema_v1_ValidationError_hashpb_sum(v, hasher, ignore)
				}
			}
		}
	}
	if _, ok := ignore["cerbos.engine.v1.CheckOutput.outputs"]; !ok {
		if len(m.Outputs) > 0 {
			for _, v := range m.Outputs {
				if v != nil {
					cerbos_engine_v1_OutputEntry_hashpb_sum(v, hasher, ignore)
				}
			}
		}
	}
}

func cerbos_engine_v1_OutputEntry_hashpb_sum(m *v1.OutputEntry, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["cerbos.engine.v1.OutputEntry.src"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetSrc()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetSrc()), len(m.GetSrc())))
	}
	if _, ok := ignore["cerbos.engine.v1.OutputEntry.val"]; !ok {
		if m.GetVal() != nil {
			google_protobuf_Value_hashpb_sum(m.GetVal(), hasher, ignore)
		}
	}
}

func cerbos_engine_v1_PlanResourcesFilter_Expression_Operand_hashpb_sum(m *v1.PlanResourcesFilter_Expression_Operand, hasher hash.Hash, ignore map[string]struct{}) {
	if m.Node != nil {
		if _, ok := ignore["cerbos.engine.v1.PlanResourcesFilter.Expression.Operand.node"]; !ok {
			switch t := m.Node.(type) {
			case *v1.PlanResourcesFilter_Expression_Operand_Value:
				if t.Value != nil {
					google_protobuf_Value_hashpb_sum(t.Value, hasher, ignore)
				}
			case *v1.PlanResourcesFilter_Expression_Operand_Expression:
				if t.Expression != nil {
					cerbos_engine_v1_PlanResourcesFilter_Expression_hashpb_sum(t.Expression, hasher, ignore)
				}
			case *v1.PlanResourcesFilter_Expression_Operand_Variable:
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(t.Variable))))
				_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(t.Variable), len(t.Variable)))
			}
		}
	}
}

func cerbos_engine_v1_PlanResourcesFilter_Expression_hashpb_sum(m *v1.PlanResourcesFilter_Expression, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["cerbos.engine.v1.PlanResourcesFilter.Expression.operator"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetOperator()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetOperator()), len(m.GetOperator())))
	}
	if _, ok := ignore["cerbos.engine.v1.PlanResourcesFilter.Expression.operands"]; !ok {
		if len(m.Operands) > 0 {
			for _, v := range m.Operands {
				if v != nil {
					cerbos_engine_v1_PlanResourcesFilter_Expression_Operand_hashpb_sum(v, hasher, ignore)
				}
			}
		}
	}
}

func cerbos_engine_v1_PlanResourcesFilter_hashpb_sum(m *v1.PlanResourcesFilter, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["cerbos.engine.v1.PlanResourcesFilter.kind"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(m.GetKind())))
	}
	if _, ok := ignore["cerbos.engine.v1.PlanResourcesFilter.condition"]; !ok {
		if m.GetCondition() != nil {
			cerbos_engine_v1_PlanResourcesFilter_Expression_Operand_hashpb_sum(m.GetCondition(), hasher, ignore)
		}
	}
}

func cerbos_engine_v1_PlanResourcesInput_Resource_hashpb_sum(m *v1.PlanResourcesInput_Resource, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["cerbos.engine.v1.PlanResourcesInput.Resource.kind"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetKind()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetKind()), len(m.GetKind())))
	}
	if _, ok := ignore["cerbos.engine.v1.PlanResourcesInput.Resource.attr"]; !ok {
		if len(m.Attr) > 0 {
			for _, k := range slices.Sorted(maps.Keys(m.Attr)) {
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(k))))
				_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(k), len(k)))
				if m.Attr[k] != nil {
					google_protobuf_Value_hashpb_sum(m.Attr[k], hasher, ignore)
				}
			}
		}
	}
	if _, ok := ignore["cerbos.engine.v1.PlanResourcesInput.Resource.policy_version"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetPolicyVersion()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetPolicyVersion()), len(m.GetPolicyVersion())))
	}
	if _, ok := ignore["cerbos.engine.v1.PlanResourcesInput.Resource.scope"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetScope()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetScope()), len(m.GetScope())))
	}
}

func cerbos_engine_v1_PlanResourcesInput_hashpb_sum(m *v1.PlanResourcesInput, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["cerbos.engine.v1.PlanResourcesInput.request_id"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetRequestId()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetRequestId()), len(m.GetRequestId())))
	}
	if _, ok := ignore["cerbos.engine.v1.PlanResourcesInput.action"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetAction()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetAction()), len(m.GetAction())))
	}
	if _, ok := ignore["cerbos.engine.v1.PlanResourcesInput.principal"]; !ok {
		if m.GetPrincipal() != nil {
			cerbos_engine_v1_Principal_hashpb_sum(m.GetPrincipal(), hasher, ignore)
		}
	}
	if _, ok := ignore["cerbos.engine.v1.PlanResourcesInput.resource"]; !ok {
		if m.GetResource() != nil {
			cerbos_engine_v1_PlanResourcesInput_Resource_hashpb_sum(m.GetResource(), hasher, ignore)
		}
	}
	if _, ok := ignore["cerbos.engine.v1.PlanResourcesInput.aux_data"]; !ok {
		if m.GetAuxData() != nil {
			cerbos_engine_v1_AuxData_hashpb_sum(m.GetAuxData(), hasher, ignore)
		}
	}
	if _, ok := ignore["cerbos.engine.v1.PlanResourcesInput.include_meta"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, protowire.EncodeBool(m.GetIncludeMeta())))
	}
	if _, ok := ignore["cerbos.engine.v1.PlanResourcesInput.actions"]; !ok {
		if len(m.Actions) > 0 {
			for _, v := range m.Actions {
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(v))))
				_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(v), len(v)))
			}
		}
	}
}

func cerbos_engine_v1_PlanResourcesOutput_hashpb_sum(m *v1.PlanResourcesOutput, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["cerbos.engine.v1.PlanResourcesOutput.request_id"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetRequestId()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetRequestId()), len(m.GetRequestId())))
	}
	if _, ok := ignore["cerbos.engine.v1.PlanResourcesOutput.action"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetAction()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetAction()), len(m.GetAction())))
	}
	if _, ok := ignore["cerbos.engine.v1.PlanResourcesOutput.kind"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetKind()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetKind()), len(m.GetKind())))
	}
	if _, ok := ignore["cerbos.engine.v1.PlanResourcesOutput.policy_version"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetPolicyVersion()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetPolicyVersion()), len(m.GetPolicyVersion())))
	}
	if _, ok := ignore["cerbos.engine.v1.PlanResourcesOutput.scope"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetScope()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetScope()), len(m.GetScope())))
	}
	if _, ok := ignore["cerbos.engine.v1.PlanResourcesOutput.filter"]; !ok {
		if m.GetFilter() != nil {
			cerbos_engine_v1_PlanResourcesFilter_hashpb_sum(m.GetFilter(), hasher, ignore)
		}
	}
	if _, ok := ignore["cerbos.engine.v1.PlanResourcesOutput.filter_debug"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetFilterDebug()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetFilterDebug()), len(m.GetFilterDebug())))
	}
	if _, ok := ignore["cerbos.engine.v1.PlanResourcesOutput.validation_errors"]; !ok {
		if len(m.ValidationErrors) > 0 {
			for _, v := range m.ValidationErrors {
				if v != nil {
					cerbos_schema_v1_ValidationError_hashpb_sum(v, hasher, ignore)
				}
			}
		}
	}
	if _, ok := ignore["cerbos.engine.v1.PlanResourcesOutput.actions"]; !ok {
		if len(m.Actions) > 0 {
			for _, v := range m.Actions {
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(v))))
				_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(v), len(v)))
			}
		}
	}
	if _, ok := ignore["cerbos.engine.v1.PlanResourcesOutput.matched_scopes"]; !ok {
		if len(m.MatchedScopes) > 0 {
			for _, k := range slices.Sorted(maps.Keys(m.MatchedScopes)) {
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(k))))
				_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(k), len(k)))
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.MatchedScopes[k]))))
				_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.MatchedScopes[k]), len(m.MatchedScopes[k])))
			}
		}
	}
}

func cerbos_engine_v1_Principal_hashpb_sum(m *v1.Principal, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["cerbos.engine.v1.Principal.id"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetId()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetId()), len(m.GetId())))
	}
	if _, ok := ignore["cerbos.engine.v1.Principal.policy_version"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetPolicyVersion()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetPolicyVersion()), len(m.GetPolicyVersion())))
	}
	if _, ok := ignore["cerbos.engine.v1.Principal.roles"]; !ok {
		if len(m.Roles) > 0 {
			for _, v := range m.Roles {
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(v))))
				_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(v), len(v)))
			}
		}
	}
	if _, ok := ignore["cerbos.engine.v1.Principal.attr"]; !ok {
		if len(m.Attr) > 0 {
			for _, k := range slices.Sorted(maps.Keys(m.Attr)) {
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(k))))
				_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(k), len(k)))
				if m.Attr[k] != nil {
					google_protobuf_Value_hashpb_sum(m.Attr[k], hasher, ignore)
				}
			}
		}
	}
	if _, ok := ignore["cerbos.engine.v1.Principal.scope"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetScope()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetScope()), len(m.GetScope())))
	}
}

func cerbos_engine_v1_Resource_hashpb_sum(m *v1.Resource, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["cerbos.engine.v1.Resource.kind"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetKind()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetKind()), len(m.GetKind())))
	}
	if _, ok := ignore["cerbos.engine.v1.Resource.policy_version"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetPolicyVersion()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetPolicyVersion()), len(m.GetPolicyVersion())))
	}
	if _, ok := ignore["cerbos.engine.v1.Resource.id"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetId()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetId()), len(m.GetId())))
	}
	if _, ok := ignore["cerbos.engine.v1.Resource.attr"]; !ok {
		if len(m.Attr) > 0 {
			for _, k := range slices.Sorted(maps.Keys(m.Attr)) {
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(k))))
				_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(k), len(k)))
				if m.Attr[k] != nil {
					google_protobuf_Value_hashpb_sum(m.Attr[k], hasher, ignore)
				}
			}
		}
	}
	if _, ok := ignore["cerbos.engine.v1.Resource.scope"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetScope()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetScope()), len(m.GetScope())))
	}
}

func cerbos_policy_v1_SourceAttributes_hashpb_sum(m *v11.SourceAttributes, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["cerbos.policy.v1.SourceAttributes.attributes"]; !ok {
		if len(m.Attributes) > 0 {
			for _, k := range slices.Sorted(maps.Keys(m.Attributes)) {
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(k))))
				_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(k), len(k)))
				if m.Attributes[k] != nil {
					google_protobuf_Value_hashpb_sum(m.Attributes[k], hasher, ignore)
				}
			}
		}
	}
}

func cerbos_schema_v1_ValidationError_hashpb_sum(m *v12.ValidationError, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["cerbos.schema.v1.ValidationError.path"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetPath()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetPath()), len(m.GetPath())))
	}
	if _, ok := ignore["cerbos.schema.v1.ValidationError.message"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetMessage()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetMessage()), len(m.GetMessage())))
	}
	if _, ok := ignore["cerbos.schema.v1.ValidationError.source"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(m.GetSource())))
	}
}

func google_protobuf_ListValue_hashpb_sum(m *structpb.ListValue, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["google.protobuf.ListValue.values"]; !ok {
		if len(m.Values) > 0 {
			for _, v := range m.Values {
				if v != nil {
					google_protobuf_Value_hashpb_sum(v, hasher, ignore)
				}
			}
		}
	}
}

func google_protobuf_Struct_hashpb_sum(m *structpb.Struct, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["google.protobuf.Struct.fields"]; !ok {
		if len(m.Fields) > 0 {
			for _, k := range slices.Sorted(maps.Keys(m.Fields)) {
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(k))))
				_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(k), len(k)))
				if m.Fields[k] != nil {
					google_protobuf_Value_hashpb_sum(m.Fields[k], hasher, ignore)
				}
			}
		}
	}
}

func google_protobuf_Timestamp_hashpb_sum(m *timestamppb.Timestamp, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["google.protobuf.Timestamp.seconds"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(m.GetSeconds())))
	}
	if _, ok := ignore["google.protobuf.Timestamp.nanos"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(m.GetNanos())))
	}
}

func google_protobuf_Value_hashpb_sum(m *structpb.Value, hasher hash.Hash, ignore map[string]struct{}) {
	if m.Kind != nil {
		if _, ok := ignore["google.protobuf.Value.kind"]; !ok {
			switch t := m.Kind.(type) {
			case *structpb.Value_NullValue:
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(t.NullValue)))
			case *structpb.Value_NumberValue:
				_, _ = hasher.Write(protowire.AppendFixed64(nil, math.Float64bits(t.NumberValue)))
			case *structpb.Value_StringValue:
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(t.StringValue))))
				_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(t.StringValue), len(t.StringValue)))
			case *structpb.Value_BoolValue:
				_, _ = hasher.Write(protowire.AppendVarint(nil, protowire.EncodeBool(t.BoolValue)))
			case *structpb.Value_StructValue:
				if t.StructValue != nil {
					google_protobuf_Struct_hashpb_sum(t.StructValue, hasher, ignore)
				}
			case *structpb.Value_ListValue:
				if t.ListValue != nil {
					google_protobuf_ListValue_hashpb_sum(t.ListValue, hasher, ignore)
				}
			}
		}
	}
}
