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: proto_util.go
    path of file: ./repos/terraform/internal/stacks/stackutils
    
    the code of the file until where you have to start completion: // Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1

package stackutils

import (
	"github.com/hashicorp/te
    
func ResourceModeForProto(mode addrs.ResourceMode) terraform1.ResourceMode {
	switch mode {
	case addrs.ManagedResourceMode:
		return terraform1.ResourceMode_MANAGED
	case addrs.DataResourceMode:
		return terraform1.ResourceMode_DATA
	default:
		// Should not get here, because the above should be exhaustive for
		// all addrs.ResourceMode variants.
		return terraform1.ResourceMode_UNKNOWN
	}
}