You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: validators.go
    path of file: ./repos/aws-sdk-go-v2/service/networkfirewall
    
    the code of the file until where you have to start completion: // Code generated by smithy-go-codegen DO NOT EDIT.

package networkfirewall

import (
	"context"
	"fmt"
	"github.com/aws/aws-sdk-go-v2/service/networkfirewall/types"
	smithy "github.com/aws/smithy-go"
	"github.com/aws/smithy-go/middleware"
)

type validateOpAssociateFirewallPolicy struct {
}

func (*validateOpAssociateFirewallPolicy) ID() string {
	return "OperationInputValidation"
}
    
func validateCustomAction(v *types.CustomAction) error {
	if v == nil {
		return nil
	}
	invalidParams := smithy.InvalidParamsError{Context: "CustomAction"}
	if v.ActionName == nil {
		invalidParams.Add(smithy.NewErrParamRequired("ActionName"))
	}
	if v.ActionDefinition == nil {
		invalidParams.Add(smithy.NewErrParamRequired("ActionDefinition"))
	} else if v.ActionDefinition != nil {
		if err := validateActionDefinition(v.ActionDefinition); err != nil {
			invalidParams.AddNested("ActionDefinition", err.(smithy.InvalidParamsError))
		}
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	} else {
		return nil
	}
}