// Copyright IBM Corp. 2014, 2026
// SPDX-License-Identifier: BUSL-1.1

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.11
// 	protoc        v5.29.3
// source: types.proto

package proto

import (
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	reflect "reflect"
	sync "sync"
	unsafe "unsafe"
)

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

// EvaluateResult contains a single value for the overall result of the evaluate
// RPC. This allows users to differentiate between different types of
// diagnostics.
type EvaluateResult int32

const (
	// INVALID means the result that was set by the server wasn't recognized by
	// the client. This means a future version of Terraform Policy has introduced
	// a new result type, and the client isn't aware of this. Clients should
	// handle this gracefully.
	EvaluateResult_INVALID_EVALUATE_RESULT EvaluateResult = 0
	// UNKNOWN means the result could not be verified at this time. This means
	// the client sent unknown values to the server as part of the request, and
	// within Terraform means the request happened at plan time. The
	// diagnostics will contain only warnings explaning which policies could
	// not be evaluated.
	EvaluateResult_UNKNOWN_EVALUATE_RESULT EvaluateResult = 1
	// ERROR means the policy files themselves were invalid in some way, and so
	// the policies could not be evaluated. This would cover things like
	// invalid references or invalid syntax. The diagnostics will contain
	// errors explaining exactly what went wrong.
	EvaluateResult_ERROR_EVALUATE_RESULT EvaluateResult = 2
	// ALLOW means the resource passed all relevant policies. The diagnostics
	// will not contain any errors, but might contain warnings.
	EvaluateResult_ALLOW_EVALUATE_RESULT EvaluateResult = 3
	// DENY means the resource failed at least one relevant policy. The
	// diagnostics will contain exact explanations as to why and should be
	// displayed to the user.
	EvaluateResult_DENY_EVALUATE_RESULT EvaluateResult = 4
	// SETUP_ERROR means the policy engine failed to set up properly. This
	// could be due to a missing or invalid configuration file, or a problem
	// with the policy engine itself. The diagnostics will contain errors
	// explaining exactly what went wrong.
	EvaluateResult_SETUP_ERROR_EVALUATE_RESULT EvaluateResult = 5
)

// Enum value maps for EvaluateResult.
var (
	EvaluateResult_name = map[int32]string{
		0: "INVALID_EVALUATE_RESULT",
		1: "UNKNOWN_EVALUATE_RESULT",
		2: "ERROR_EVALUATE_RESULT",
		3: "ALLOW_EVALUATE_RESULT",
		4: "DENY_EVALUATE_RESULT",
		5: "SETUP_ERROR_EVALUATE_RESULT",
	}
	EvaluateResult_value = map[string]int32{
		"INVALID_EVALUATE_RESULT":     0,
		"UNKNOWN_EVALUATE_RESULT":     1,
		"ERROR_EVALUATE_RESULT":       2,
		"ALLOW_EVALUATE_RESULT":       3,
		"DENY_EVALUATE_RESULT":        4,
		"SETUP_ERROR_EVALUATE_RESULT": 5,
	}
)

func (x EvaluateResult) Enum() *EvaluateResult {
	p := new(EvaluateResult)
	*p = x
	return p
}

func (x EvaluateResult) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (EvaluateResult) Descriptor() protoreflect.EnumDescriptor {
	return file_types_proto_enumTypes[0].Descriptor()
}

func (EvaluateResult) Type() protoreflect.EnumType {
	return &file_types_proto_enumTypes[0]
}

func (x EvaluateResult) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use EvaluateResult.Descriptor instead.
func (EvaluateResult) EnumDescriptor() ([]byte, []int) {
	return file_types_proto_rawDescGZIP(), []int{0}
}

// Operation represents the Terraform operation being performed on a resource.
type Operation int32

const (
	Operation_CREATE Operation = 0
	Operation_UPDATE Operation = 1
	Operation_DELETE Operation = 2
)

// Enum value maps for Operation.
var (
	Operation_name = map[int32]string{
		0: "CREATE",
		1: "UPDATE",
		2: "DELETE",
	}
	Operation_value = map[string]int32{
		"CREATE": 0,
		"UPDATE": 1,
		"DELETE": 2,
	}
)

func (x Operation) Enum() *Operation {
	p := new(Operation)
	*p = x
	return p
}

func (x Operation) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (Operation) Descriptor() protoreflect.EnumDescriptor {
	return file_types_proto_enumTypes[1].Descriptor()
}

func (Operation) Type() protoreflect.EnumType {
	return &file_types_proto_enumTypes[1]
}

func (x Operation) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use Operation.Descriptor instead.
func (Operation) EnumDescriptor() ([]byte, []int) {
	return file_types_proto_rawDescGZIP(), []int{1}
}

var File_types_proto protoreflect.FileDescriptor

const file_types_proto_rawDesc = "" +
	"\n" +
	"\vtypes.proto\x12\x05proto*\xbb\x01\n" +
	"\x0eEvaluateResult\x12\x1b\n" +
	"\x17INVALID_EVALUATE_RESULT\x10\x00\x12\x1b\n" +
	"\x17UNKNOWN_EVALUATE_RESULT\x10\x01\x12\x19\n" +
	"\x15ERROR_EVALUATE_RESULT\x10\x02\x12\x19\n" +
	"\x15ALLOW_EVALUATE_RESULT\x10\x03\x12\x18\n" +
	"\x14DENY_EVALUATE_RESULT\x10\x04\x12\x1f\n" +
	"\x1bSETUP_ERROR_EVALUATE_RESULT\x10\x05*/\n" +
	"\tOperation\x12\n" +
	"\n" +
	"\x06CREATE\x10\x00\x12\n" +
	"\n" +
	"\x06UPDATE\x10\x01\x12\n" +
	"\n" +
	"\x06DELETE\x10\x02B4Z2github.com/hashicorp/terraform-policy-plugin/protob\x06proto3"

var (
	file_types_proto_rawDescOnce sync.Once
	file_types_proto_rawDescData []byte
)

func file_types_proto_rawDescGZIP() []byte {
	file_types_proto_rawDescOnce.Do(func() {
		file_types_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_types_proto_rawDesc), len(file_types_proto_rawDesc)))
	})
	return file_types_proto_rawDescData
}

var file_types_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_types_proto_goTypes = []any{
	(EvaluateResult)(0), // 0: proto.EvaluateResult
	(Operation)(0),      // 1: proto.Operation
}
var file_types_proto_depIdxs = []int32{
	0, // [0:0] is the sub-list for method output_type
	0, // [0:0] is the sub-list for method input_type
	0, // [0:0] is the sub-list for extension type_name
	0, // [0:0] is the sub-list for extension extendee
	0, // [0:0] is the sub-list for field type_name
}

func init() { file_types_proto_init() }
func file_types_proto_init() {
	if File_types_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_types_proto_rawDesc), len(file_types_proto_rawDesc)),
			NumEnums:      2,
			NumMessages:   0,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_types_proto_goTypes,
		DependencyIndexes: file_types_proto_depIdxs,
		EnumInfos:         file_types_proto_enumTypes,
	}.Build()
	File_types_proto = out.File
	file_types_proto_goTypes = nil
	file_types_proto_depIdxs = nil
}
