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

package enginev1

import (
	v1 "github.com/cerbos/cerbos/api/genpb/cerbos/schema/v1"
	v1alpha1 "google.golang.org/genproto/googleapis/api/expr/v1alpha1"
	protowire "google.golang.org/protobuf/encoding/protowire"
	durationpb "google.golang.org/protobuf/types/known/durationpb"
	emptypb "google.golang.org/protobuf/types/known/emptypb"
	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_engine_v1_AuxData_hashpb_sum(m *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 *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 *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 *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 *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_PlanResourcesAst_LogicalOperation_hashpb_sum(m *PlanResourcesAst_LogicalOperation, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["cerbos.engine.v1.PlanResourcesAst.LogicalOperation.operator"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(m.GetOperator())))
	}
	if _, ok := ignore["cerbos.engine.v1.PlanResourcesAst.LogicalOperation.nodes"]; !ok {
		if len(m.Nodes) > 0 {
			for _, v := range m.Nodes {
				if v != nil {
					cerbos_engine_v1_PlanResourcesAst_Node_hashpb_sum(v, hasher, ignore)
				}
			}
		}
	}
}

func cerbos_engine_v1_PlanResourcesAst_Node_hashpb_sum(m *PlanResourcesAst_Node, hasher hash.Hash, ignore map[string]struct{}) {
	if m.Node != nil {
		if _, ok := ignore["cerbos.engine.v1.PlanResourcesAst.Node.node"]; !ok {
			switch t := m.Node.(type) {
			case *PlanResourcesAst_Node_LogicalOperation:
				if t.LogicalOperation != nil {
					cerbos_engine_v1_PlanResourcesAst_LogicalOperation_hashpb_sum(t.LogicalOperation, hasher, ignore)
				}
			case *PlanResourcesAst_Node_Expression:
				if t.Expression != nil {
					google_api_expr_v1alpha1_CheckedExpr_hashpb_sum(t.Expression, hasher, ignore)
				}
			}
		}
	}
}

func cerbos_engine_v1_PlanResourcesAst_hashpb_sum(m *PlanResourcesAst, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["cerbos.engine.v1.PlanResourcesAst.filter_ast"]; !ok {
		if m.GetFilterAst() != nil {
			cerbos_engine_v1_PlanResourcesAst_Node_hashpb_sum(m.GetFilterAst(), hasher, ignore)
		}
	}
}

func cerbos_engine_v1_PlanResourcesFilter_Expression_Operand_hashpb_sum(m *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 *PlanResourcesFilter_Expression_Operand_Value:
				if t.Value != nil {
					google_protobuf_Value_hashpb_sum(t.Value, hasher, ignore)
				}
			case *PlanResourcesFilter_Expression_Operand_Expression:
				if t.Expression != nil {
					cerbos_engine_v1_PlanResourcesFilter_Expression_hashpb_sum(t.Expression, hasher, ignore)
				}
			case *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 *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 *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 *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 *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 *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 *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_Request_Principal_hashpb_sum(m *Request_Principal, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["cerbos.engine.v1.Request.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.Request.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.Request.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.Request.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.Request.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_Request_Resource_hashpb_sum(m *Request_Resource, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["cerbos.engine.v1.Request.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.Request.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.Request.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.Request.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.Request.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_Request_hashpb_sum(m *Request, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["cerbos.engine.v1.Request.principal"]; !ok {
		if m.GetPrincipal() != nil {
			cerbos_engine_v1_Request_Principal_hashpb_sum(m.GetPrincipal(), hasher, ignore)
		}
	}
	if _, ok := ignore["cerbos.engine.v1.Request.resource"]; !ok {
		if m.GetResource() != nil {
			cerbos_engine_v1_Request_Resource_hashpb_sum(m.GetResource(), hasher, ignore)
		}
	}
	if _, ok := ignore["cerbos.engine.v1.Request.aux_data"]; !ok {
		if m.GetAuxData() != nil {
			cerbos_engine_v1_AuxData_hashpb_sum(m.GetAuxData(), hasher, ignore)
		}
	}
}

func cerbos_engine_v1_Resource_hashpb_sum(m *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_engine_v1_Runtime_hashpb_sum(m *Runtime, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["cerbos.engine.v1.Runtime.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)))
			}
		}
	}
}

func cerbos_engine_v1_Trace_Component_Variable_hashpb_sum(m *Trace_Component_Variable, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["cerbos.engine.v1.Trace.Component.Variable.name"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetName()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetName()), len(m.GetName())))
	}
	if _, ok := ignore["cerbos.engine.v1.Trace.Component.Variable.expr"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetExpr()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetExpr()), len(m.GetExpr())))
	}
}

func cerbos_engine_v1_Trace_Component_hashpb_sum(m *Trace_Component, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["cerbos.engine.v1.Trace.Component.kind"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(m.GetKind())))
	}
	if m.Details != nil {
		if _, ok := ignore["cerbos.engine.v1.Trace.Component.details"]; !ok {
			switch t := m.Details.(type) {
			case *Trace_Component_Action:
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(t.Action))))
				_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(t.Action), len(t.Action)))
			case *Trace_Component_DerivedRole:
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(t.DerivedRole))))
				_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(t.DerivedRole), len(t.DerivedRole)))
			case *Trace_Component_Expr:
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(t.Expr))))
				_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(t.Expr), len(t.Expr)))
			case *Trace_Component_Index:
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(t.Index)))
			case *Trace_Component_Policy:
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(t.Policy))))
				_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(t.Policy), len(t.Policy)))
			case *Trace_Component_Resource:
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(t.Resource))))
				_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(t.Resource), len(t.Resource)))
			case *Trace_Component_Rule:
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(t.Rule))))
				_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(t.Rule), len(t.Rule)))
			case *Trace_Component_Scope:
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(t.Scope))))
				_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(t.Scope), len(t.Scope)))
			case *Trace_Component_Variable_:
				if t.Variable != nil {
					cerbos_engine_v1_Trace_Component_Variable_hashpb_sum(t.Variable, hasher, ignore)
				}
			case *Trace_Component_Output:
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(t.Output))))
				_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(t.Output), len(t.Output)))
			case *Trace_Component_RolePolicyScope:
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(t.RolePolicyScope))))
				_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(t.RolePolicyScope), len(t.RolePolicyScope)))
			case *Trace_Component_Role:
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(t.Role))))
				_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(t.Role), len(t.Role)))
			}
		}
	}
}

func cerbos_engine_v1_Trace_Event_hashpb_sum(m *Trace_Event, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["cerbos.engine.v1.Trace.Event.status"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(m.GetStatus())))
	}
	if _, ok := ignore["cerbos.engine.v1.Trace.Event.effect"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(m.GetEffect())))
	}
	if _, ok := ignore["cerbos.engine.v1.Trace.Event.error"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetError()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetError()), len(m.GetError())))
	}
	if _, ok := ignore["cerbos.engine.v1.Trace.Event.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.engine.v1.Trace.Event.result"]; !ok {
		if m.GetResult() != nil {
			google_protobuf_Value_hashpb_sum(m.GetResult(), hasher, ignore)
		}
	}
}

func cerbos_engine_v1_Trace_hashpb_sum(m *Trace, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["cerbos.engine.v1.Trace.components"]; !ok {
		if len(m.Components) > 0 {
			for _, v := range m.Components {
				if v != nil {
					cerbos_engine_v1_Trace_Component_hashpb_sum(v, hasher, ignore)
				}
			}
		}
	}
	if _, ok := ignore["cerbos.engine.v1.Trace.event"]; !ok {
		if m.GetEvent() != nil {
			cerbos_engine_v1_Trace_Event_hashpb_sum(m.GetEvent(), hasher, ignore)
		}
	}
}

func cerbos_schema_v1_ValidationError_hashpb_sum(m *v1.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_api_expr_v1alpha1_CheckedExpr_hashpb_sum(m *v1alpha1.CheckedExpr, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["google.api.expr.v1alpha1.CheckedExpr.reference_map"]; !ok {
		if len(m.ReferenceMap) > 0 {
			for _, k := range slices.Sorted(maps.Keys(m.ReferenceMap)) {
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(k)))
				if m.ReferenceMap[k] != nil {
					google_api_expr_v1alpha1_Reference_hashpb_sum(m.ReferenceMap[k], hasher, ignore)
				}
			}
		}
	}
	if _, ok := ignore["google.api.expr.v1alpha1.CheckedExpr.type_map"]; !ok {
		if len(m.TypeMap) > 0 {
			for _, k := range slices.Sorted(maps.Keys(m.TypeMap)) {
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(k)))
				if m.TypeMap[k] != nil {
					google_api_expr_v1alpha1_Type_hashpb_sum(m.TypeMap[k], hasher, ignore)
				}
			}
		}
	}
	if _, ok := ignore["google.api.expr.v1alpha1.CheckedExpr.expr"]; !ok {
		if m.GetExpr() != nil {
			google_api_expr_v1alpha1_Expr_hashpb_sum(m.GetExpr(), hasher, ignore)
		}
	}
	if _, ok := ignore["google.api.expr.v1alpha1.CheckedExpr.source_info"]; !ok {
		if m.GetSourceInfo() != nil {
			google_api_expr_v1alpha1_SourceInfo_hashpb_sum(m.GetSourceInfo(), hasher, ignore)
		}
	}
	if _, ok := ignore["google.api.expr.v1alpha1.CheckedExpr.expr_version"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetExprVersion()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetExprVersion()), len(m.GetExprVersion())))
	}
}

func google_api_expr_v1alpha1_Constant_hashpb_sum(m *v1alpha1.Constant, hasher hash.Hash, ignore map[string]struct{}) {
	if m.ConstantKind != nil {
		if _, ok := ignore["google.api.expr.v1alpha1.Constant.constant_kind"]; !ok {
			switch t := m.ConstantKind.(type) {
			case *v1alpha1.Constant_NullValue:
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(t.NullValue)))
			case *v1alpha1.Constant_BoolValue:
				_, _ = hasher.Write(protowire.AppendVarint(nil, protowire.EncodeBool(t.BoolValue)))
			case *v1alpha1.Constant_Int64Value:
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(t.Int64Value)))
			case *v1alpha1.Constant_Uint64Value:
				_, _ = hasher.Write(protowire.AppendVarint(nil, t.Uint64Value))
			case *v1alpha1.Constant_DoubleValue:
				_, _ = hasher.Write(protowire.AppendFixed64(nil, math.Float64bits(t.DoubleValue)))
			case *v1alpha1.Constant_StringValue:
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(t.StringValue))))
				_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(t.StringValue), len(t.StringValue)))
			case *v1alpha1.Constant_BytesValue:
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(t.BytesValue))))
				_, _ = hasher.Write(t.BytesValue)
			case *v1alpha1.Constant_DurationValue:
				if t.DurationValue != nil {
					google_protobuf_Duration_hashpb_sum(t.DurationValue, hasher, ignore)
				}
			case *v1alpha1.Constant_TimestampValue:
				if t.TimestampValue != nil {
					google_protobuf_Timestamp_hashpb_sum(t.TimestampValue, hasher, ignore)
				}
			}
		}
	}
}

func google_api_expr_v1alpha1_Expr_Call_hashpb_sum(m *v1alpha1.Expr_Call, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["google.api.expr.v1alpha1.Expr.Call.target"]; !ok {
		if m.GetTarget() != nil {
			google_api_expr_v1alpha1_Expr_hashpb_sum(m.GetTarget(), hasher, ignore)
		}
	}
	if _, ok := ignore["google.api.expr.v1alpha1.Expr.Call.function"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetFunction()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetFunction()), len(m.GetFunction())))
	}
	if _, ok := ignore["google.api.expr.v1alpha1.Expr.Call.args"]; !ok {
		if len(m.Args) > 0 {
			for _, v := range m.Args {
				if v != nil {
					google_api_expr_v1alpha1_Expr_hashpb_sum(v, hasher, ignore)
				}
			}
		}
	}
}

func google_api_expr_v1alpha1_Expr_Comprehension_hashpb_sum(m *v1alpha1.Expr_Comprehension, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["google.api.expr.v1alpha1.Expr.Comprehension.iter_var"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetIterVar()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetIterVar()), len(m.GetIterVar())))
	}
	if _, ok := ignore["google.api.expr.v1alpha1.Expr.Comprehension.iter_range"]; !ok {
		if m.GetIterRange() != nil {
			google_api_expr_v1alpha1_Expr_hashpb_sum(m.GetIterRange(), hasher, ignore)
		}
	}
	if _, ok := ignore["google.api.expr.v1alpha1.Expr.Comprehension.accu_var"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetAccuVar()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetAccuVar()), len(m.GetAccuVar())))
	}
	if _, ok := ignore["google.api.expr.v1alpha1.Expr.Comprehension.accu_init"]; !ok {
		if m.GetAccuInit() != nil {
			google_api_expr_v1alpha1_Expr_hashpb_sum(m.GetAccuInit(), hasher, ignore)
		}
	}
	if _, ok := ignore["google.api.expr.v1alpha1.Expr.Comprehension.loop_condition"]; !ok {
		if m.GetLoopCondition() != nil {
			google_api_expr_v1alpha1_Expr_hashpb_sum(m.GetLoopCondition(), hasher, ignore)
		}
	}
	if _, ok := ignore["google.api.expr.v1alpha1.Expr.Comprehension.loop_step"]; !ok {
		if m.GetLoopStep() != nil {
			google_api_expr_v1alpha1_Expr_hashpb_sum(m.GetLoopStep(), hasher, ignore)
		}
	}
	if _, ok := ignore["google.api.expr.v1alpha1.Expr.Comprehension.result"]; !ok {
		if m.GetResult() != nil {
			google_api_expr_v1alpha1_Expr_hashpb_sum(m.GetResult(), hasher, ignore)
		}
	}
	if _, ok := ignore["google.api.expr.v1alpha1.Expr.Comprehension.iter_var2"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetIterVar2()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetIterVar2()), len(m.GetIterVar2())))
	}
}

func google_api_expr_v1alpha1_Expr_CreateList_hashpb_sum(m *v1alpha1.Expr_CreateList, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["google.api.expr.v1alpha1.Expr.CreateList.elements"]; !ok {
		if len(m.Elements) > 0 {
			for _, v := range m.Elements {
				if v != nil {
					google_api_expr_v1alpha1_Expr_hashpb_sum(v, hasher, ignore)
				}
			}
		}
	}
	if _, ok := ignore["google.api.expr.v1alpha1.Expr.CreateList.optional_indices"]; !ok {
		if len(m.OptionalIndices) > 0 {
			for _, v := range m.OptionalIndices {
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(v)))
			}
		}
	}
}

func google_api_expr_v1alpha1_Expr_CreateStruct_Entry_hashpb_sum(m *v1alpha1.Expr_CreateStruct_Entry, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["google.api.expr.v1alpha1.Expr.CreateStruct.Entry.id"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(m.GetId())))
	}
	if m.KeyKind != nil {
		if _, ok := ignore["google.api.expr.v1alpha1.Expr.CreateStruct.Entry.key_kind"]; !ok {
			switch t := m.KeyKind.(type) {
			case *v1alpha1.Expr_CreateStruct_Entry_FieldKey:
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(t.FieldKey))))
				_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(t.FieldKey), len(t.FieldKey)))
			case *v1alpha1.Expr_CreateStruct_Entry_MapKey:
				if t.MapKey != nil {
					google_api_expr_v1alpha1_Expr_hashpb_sum(t.MapKey, hasher, ignore)
				}
			}
		}
	}
	if _, ok := ignore["google.api.expr.v1alpha1.Expr.CreateStruct.Entry.value"]; !ok {
		if m.GetValue() != nil {
			google_api_expr_v1alpha1_Expr_hashpb_sum(m.GetValue(), hasher, ignore)
		}
	}
	if _, ok := ignore["google.api.expr.v1alpha1.Expr.CreateStruct.Entry.optional_entry"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, protowire.EncodeBool(m.GetOptionalEntry())))
	}
}

func google_api_expr_v1alpha1_Expr_CreateStruct_hashpb_sum(m *v1alpha1.Expr_CreateStruct, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["google.api.expr.v1alpha1.Expr.CreateStruct.message_name"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetMessageName()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetMessageName()), len(m.GetMessageName())))
	}
	if _, ok := ignore["google.api.expr.v1alpha1.Expr.CreateStruct.entries"]; !ok {
		if len(m.Entries) > 0 {
			for _, v := range m.Entries {
				if v != nil {
					google_api_expr_v1alpha1_Expr_CreateStruct_Entry_hashpb_sum(v, hasher, ignore)
				}
			}
		}
	}
}

func google_api_expr_v1alpha1_Expr_Ident_hashpb_sum(m *v1alpha1.Expr_Ident, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["google.api.expr.v1alpha1.Expr.Ident.name"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetName()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetName()), len(m.GetName())))
	}
}

func google_api_expr_v1alpha1_Expr_Select_hashpb_sum(m *v1alpha1.Expr_Select, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["google.api.expr.v1alpha1.Expr.Select.operand"]; !ok {
		if m.GetOperand() != nil {
			google_api_expr_v1alpha1_Expr_hashpb_sum(m.GetOperand(), hasher, ignore)
		}
	}
	if _, ok := ignore["google.api.expr.v1alpha1.Expr.Select.field"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetField()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetField()), len(m.GetField())))
	}
	if _, ok := ignore["google.api.expr.v1alpha1.Expr.Select.test_only"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, protowire.EncodeBool(m.GetTestOnly())))
	}
}

func google_api_expr_v1alpha1_Expr_hashpb_sum(m *v1alpha1.Expr, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["google.api.expr.v1alpha1.Expr.id"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(m.GetId())))
	}
	if m.ExprKind != nil {
		if _, ok := ignore["google.api.expr.v1alpha1.Expr.expr_kind"]; !ok {
			switch t := m.ExprKind.(type) {
			case *v1alpha1.Expr_ConstExpr:
				if t.ConstExpr != nil {
					google_api_expr_v1alpha1_Constant_hashpb_sum(t.ConstExpr, hasher, ignore)
				}
			case *v1alpha1.Expr_IdentExpr:
				if t.IdentExpr != nil {
					google_api_expr_v1alpha1_Expr_Ident_hashpb_sum(t.IdentExpr, hasher, ignore)
				}
			case *v1alpha1.Expr_SelectExpr:
				if t.SelectExpr != nil {
					google_api_expr_v1alpha1_Expr_Select_hashpb_sum(t.SelectExpr, hasher, ignore)
				}
			case *v1alpha1.Expr_CallExpr:
				if t.CallExpr != nil {
					google_api_expr_v1alpha1_Expr_Call_hashpb_sum(t.CallExpr, hasher, ignore)
				}
			case *v1alpha1.Expr_ListExpr:
				if t.ListExpr != nil {
					google_api_expr_v1alpha1_Expr_CreateList_hashpb_sum(t.ListExpr, hasher, ignore)
				}
			case *v1alpha1.Expr_StructExpr:
				if t.StructExpr != nil {
					google_api_expr_v1alpha1_Expr_CreateStruct_hashpb_sum(t.StructExpr, hasher, ignore)
				}
			case *v1alpha1.Expr_ComprehensionExpr:
				if t.ComprehensionExpr != nil {
					google_api_expr_v1alpha1_Expr_Comprehension_hashpb_sum(t.ComprehensionExpr, hasher, ignore)
				}
			}
		}
	}
}

func google_api_expr_v1alpha1_Reference_hashpb_sum(m *v1alpha1.Reference, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["google.api.expr.v1alpha1.Reference.name"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetName()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetName()), len(m.GetName())))
	}
	if _, ok := ignore["google.api.expr.v1alpha1.Reference.overload_id"]; !ok {
		if len(m.OverloadId) > 0 {
			for _, v := range m.OverloadId {
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(v))))
				_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(v), len(v)))
			}
		}
	}
	if _, ok := ignore["google.api.expr.v1alpha1.Reference.value"]; !ok {
		if m.GetValue() != nil {
			google_api_expr_v1alpha1_Constant_hashpb_sum(m.GetValue(), hasher, ignore)
		}
	}
}

func google_api_expr_v1alpha1_SourceInfo_Extension_Version_hashpb_sum(m *v1alpha1.SourceInfo_Extension_Version, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["google.api.expr.v1alpha1.SourceInfo.Extension.Version.major"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(m.GetMajor())))
	}
	if _, ok := ignore["google.api.expr.v1alpha1.SourceInfo.Extension.Version.minor"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(m.GetMinor())))
	}
}

func google_api_expr_v1alpha1_SourceInfo_Extension_hashpb_sum(m *v1alpha1.SourceInfo_Extension, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["google.api.expr.v1alpha1.SourceInfo.Extension.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["google.api.expr.v1alpha1.SourceInfo.Extension.affected_components"]; !ok {
		if len(m.AffectedComponents) > 0 {
			for _, v := range m.AffectedComponents {
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(v)))
			}
		}
	}
	if _, ok := ignore["google.api.expr.v1alpha1.SourceInfo.Extension.version"]; !ok {
		if m.GetVersion() != nil {
			google_api_expr_v1alpha1_SourceInfo_Extension_Version_hashpb_sum(m.GetVersion(), hasher, ignore)
		}
	}
}

func google_api_expr_v1alpha1_SourceInfo_hashpb_sum(m *v1alpha1.SourceInfo, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["google.api.expr.v1alpha1.SourceInfo.syntax_version"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetSyntaxVersion()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetSyntaxVersion()), len(m.GetSyntaxVersion())))
	}
	if _, ok := ignore["google.api.expr.v1alpha1.SourceInfo.location"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetLocation()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetLocation()), len(m.GetLocation())))
	}
	if _, ok := ignore["google.api.expr.v1alpha1.SourceInfo.line_offsets"]; !ok {
		if len(m.LineOffsets) > 0 {
			for _, v := range m.LineOffsets {
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(v)))
			}
		}
	}
	if _, ok := ignore["google.api.expr.v1alpha1.SourceInfo.positions"]; !ok {
		if len(m.Positions) > 0 {
			for _, k := range slices.Sorted(maps.Keys(m.Positions)) {
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(k)))
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(m.Positions[k])))
			}
		}
	}
	if _, ok := ignore["google.api.expr.v1alpha1.SourceInfo.macro_calls"]; !ok {
		if len(m.MacroCalls) > 0 {
			for _, k := range slices.Sorted(maps.Keys(m.MacroCalls)) {
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(k)))
				if m.MacroCalls[k] != nil {
					google_api_expr_v1alpha1_Expr_hashpb_sum(m.MacroCalls[k], hasher, ignore)
				}
			}
		}
	}
	if _, ok := ignore["google.api.expr.v1alpha1.SourceInfo.extensions"]; !ok {
		if len(m.Extensions) > 0 {
			for _, v := range m.Extensions {
				if v != nil {
					google_api_expr_v1alpha1_SourceInfo_Extension_hashpb_sum(v, hasher, ignore)
				}
			}
		}
	}
}

func google_api_expr_v1alpha1_Type_AbstractType_hashpb_sum(m *v1alpha1.Type_AbstractType, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["google.api.expr.v1alpha1.Type.AbstractType.name"]; !ok {
		_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(m.GetName()))))
		_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(m.GetName()), len(m.GetName())))
	}
	if _, ok := ignore["google.api.expr.v1alpha1.Type.AbstractType.parameter_types"]; !ok {
		if len(m.ParameterTypes) > 0 {
			for _, v := range m.ParameterTypes {
				if v != nil {
					google_api_expr_v1alpha1_Type_hashpb_sum(v, hasher, ignore)
				}
			}
		}
	}
}

func google_api_expr_v1alpha1_Type_FunctionType_hashpb_sum(m *v1alpha1.Type_FunctionType, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["google.api.expr.v1alpha1.Type.FunctionType.result_type"]; !ok {
		if m.GetResultType() != nil {
			google_api_expr_v1alpha1_Type_hashpb_sum(m.GetResultType(), hasher, ignore)
		}
	}
	if _, ok := ignore["google.api.expr.v1alpha1.Type.FunctionType.arg_types"]; !ok {
		if len(m.ArgTypes) > 0 {
			for _, v := range m.ArgTypes {
				if v != nil {
					google_api_expr_v1alpha1_Type_hashpb_sum(v, hasher, ignore)
				}
			}
		}
	}
}

func google_api_expr_v1alpha1_Type_ListType_hashpb_sum(m *v1alpha1.Type_ListType, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["google.api.expr.v1alpha1.Type.ListType.elem_type"]; !ok {
		if m.GetElemType() != nil {
			google_api_expr_v1alpha1_Type_hashpb_sum(m.GetElemType(), hasher, ignore)
		}
	}
}

func google_api_expr_v1alpha1_Type_MapType_hashpb_sum(m *v1alpha1.Type_MapType, hasher hash.Hash, ignore map[string]struct{}) {
	if _, ok := ignore["google.api.expr.v1alpha1.Type.MapType.key_type"]; !ok {
		if m.GetKeyType() != nil {
			google_api_expr_v1alpha1_Type_hashpb_sum(m.GetKeyType(), hasher, ignore)
		}
	}
	if _, ok := ignore["google.api.expr.v1alpha1.Type.MapType.value_type"]; !ok {
		if m.GetValueType() != nil {
			google_api_expr_v1alpha1_Type_hashpb_sum(m.GetValueType(), hasher, ignore)
		}
	}
}

func google_api_expr_v1alpha1_Type_hashpb_sum(m *v1alpha1.Type, hasher hash.Hash, ignore map[string]struct{}) {
	if m.TypeKind != nil {
		if _, ok := ignore["google.api.expr.v1alpha1.Type.type_kind"]; !ok {
			switch t := m.TypeKind.(type) {
			case *v1alpha1.Type_Dyn:
				if t.Dyn != nil {
					google_protobuf_Empty_hashpb_sum(t.Dyn, hasher, ignore)
				}
			case *v1alpha1.Type_Null:
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(t.Null)))
			case *v1alpha1.Type_Primitive:
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(t.Primitive)))
			case *v1alpha1.Type_Wrapper:
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(t.Wrapper)))
			case *v1alpha1.Type_WellKnown:
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(t.WellKnown)))
			case *v1alpha1.Type_ListType_:
				if t.ListType != nil {
					google_api_expr_v1alpha1_Type_ListType_hashpb_sum(t.ListType, hasher, ignore)
				}
			case *v1alpha1.Type_MapType_:
				if t.MapType != nil {
					google_api_expr_v1alpha1_Type_MapType_hashpb_sum(t.MapType, hasher, ignore)
				}
			case *v1alpha1.Type_Function:
				if t.Function != nil {
					google_api_expr_v1alpha1_Type_FunctionType_hashpb_sum(t.Function, hasher, ignore)
				}
			case *v1alpha1.Type_MessageType:
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(t.MessageType))))
				_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(t.MessageType), len(t.MessageType)))
			case *v1alpha1.Type_TypeParam:
				_, _ = hasher.Write(protowire.AppendVarint(nil, uint64(len(t.TypeParam))))
				_, _ = hasher.Write(unsafe.Slice(unsafe.StringData(t.TypeParam), len(t.TypeParam)))
			case *v1alpha1.Type_Type:
				if t.Type != nil {
					google_api_expr_v1alpha1_Type_hashpb_sum(t.Type, hasher, ignore)
				}
			case *v1alpha1.Type_Error:
				if t.Error != nil {
					google_protobuf_Empty_hashpb_sum(t.Error, hasher, ignore)
				}
			case *v1alpha1.Type_AbstractType_:
				if t.AbstractType != nil {
					google_api_expr_v1alpha1_Type_AbstractType_hashpb_sum(t.AbstractType, hasher, ignore)
				}
			}
		}
	}
}

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

func google_protobuf_Empty_hashpb_sum(m *emptypb.Empty, hasher hash.Hash, ignore map[string]struct{}) {
}

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)
				}
			}
		}
	}
}
