// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.11
// 	protoc        (unknown)
// source: runtime/v1/application_results.proto

package runtimev1

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

// ApplicationResultState deliberately hides Runtime queue, lease, retry, and
// dependency states. A nonterminal command is only pending.
type ApplicationResultState int32

const (
	ApplicationResultState_APPLICATION_RESULT_STATE_UNSPECIFIED ApplicationResultState = 0
	ApplicationResultState_APPLICATION_RESULT_STATE_PENDING     ApplicationResultState = 1
	ApplicationResultState_APPLICATION_RESULT_STATE_TERMINAL    ApplicationResultState = 2
)

// Enum value maps for ApplicationResultState.
var (
	ApplicationResultState_name = map[int32]string{
		0: "APPLICATION_RESULT_STATE_UNSPECIFIED",
		1: "APPLICATION_RESULT_STATE_PENDING",
		2: "APPLICATION_RESULT_STATE_TERMINAL",
	}
	ApplicationResultState_value = map[string]int32{
		"APPLICATION_RESULT_STATE_UNSPECIFIED": 0,
		"APPLICATION_RESULT_STATE_PENDING":     1,
		"APPLICATION_RESULT_STATE_TERMINAL":    2,
	}
)

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

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

func (ApplicationResultState) Descriptor() protoreflect.EnumDescriptor {
	return file_runtime_v1_application_results_proto_enumTypes[0].Descriptor()
}

func (ApplicationResultState) Type() protoreflect.EnumType {
	return &file_runtime_v1_application_results_proto_enumTypes[0]
}

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

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

type ApplicationResultOutcome int32

const (
	ApplicationResultOutcome_APPLICATION_RESULT_OUTCOME_UNSPECIFIED ApplicationResultOutcome = 0
	ApplicationResultOutcome_APPLICATION_RESULT_OUTCOME_APPLIED     ApplicationResultOutcome = 1
	ApplicationResultOutcome_APPLICATION_RESULT_OUTCOME_NOOP        ApplicationResultOutcome = 2
	ApplicationResultOutcome_APPLICATION_RESULT_OUTCOME_REJECTED    ApplicationResultOutcome = 3
	ApplicationResultOutcome_APPLICATION_RESULT_OUTCOME_FAILED      ApplicationResultOutcome = 4
)

// Enum value maps for ApplicationResultOutcome.
var (
	ApplicationResultOutcome_name = map[int32]string{
		0: "APPLICATION_RESULT_OUTCOME_UNSPECIFIED",
		1: "APPLICATION_RESULT_OUTCOME_APPLIED",
		2: "APPLICATION_RESULT_OUTCOME_NOOP",
		3: "APPLICATION_RESULT_OUTCOME_REJECTED",
		4: "APPLICATION_RESULT_OUTCOME_FAILED",
	}
	ApplicationResultOutcome_value = map[string]int32{
		"APPLICATION_RESULT_OUTCOME_UNSPECIFIED": 0,
		"APPLICATION_RESULT_OUTCOME_APPLIED":     1,
		"APPLICATION_RESULT_OUTCOME_NOOP":        2,
		"APPLICATION_RESULT_OUTCOME_REJECTED":    3,
		"APPLICATION_RESULT_OUTCOME_FAILED":      4,
	}
)

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

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

func (ApplicationResultOutcome) Descriptor() protoreflect.EnumDescriptor {
	return file_runtime_v1_application_results_proto_enumTypes[1].Descriptor()
}

func (ApplicationResultOutcome) Type() protoreflect.EnumType {
	return &file_runtime_v1_application_results_proto_enumTypes[1]
}

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

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

// The unspecified failure code is valid only for APPLIED and NOOP results.
// Other outcomes require their one disclosure-safe failure code.
type ApplicationResultFailureCode int32

const (
	ApplicationResultFailureCode_APPLICATION_RESULT_FAILURE_CODE_UNSPECIFIED              ApplicationResultFailureCode = 0
	ApplicationResultFailureCode_APPLICATION_RESULT_FAILURE_CODE_APPLICATION_REJECTED     ApplicationResultFailureCode = 1
	ApplicationResultFailureCode_APPLICATION_RESULT_FAILURE_CODE_RUNTIME_EXECUTION_FAILED ApplicationResultFailureCode = 2
)

// Enum value maps for ApplicationResultFailureCode.
var (
	ApplicationResultFailureCode_name = map[int32]string{
		0: "APPLICATION_RESULT_FAILURE_CODE_UNSPECIFIED",
		1: "APPLICATION_RESULT_FAILURE_CODE_APPLICATION_REJECTED",
		2: "APPLICATION_RESULT_FAILURE_CODE_RUNTIME_EXECUTION_FAILED",
	}
	ApplicationResultFailureCode_value = map[string]int32{
		"APPLICATION_RESULT_FAILURE_CODE_UNSPECIFIED":              0,
		"APPLICATION_RESULT_FAILURE_CODE_APPLICATION_REJECTED":     1,
		"APPLICATION_RESULT_FAILURE_CODE_RUNTIME_EXECUTION_FAILED": 2,
	}
)

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

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

func (ApplicationResultFailureCode) Descriptor() protoreflect.EnumDescriptor {
	return file_runtime_v1_application_results_proto_enumTypes[2].Descriptor()
}

func (ApplicationResultFailureCode) Type() protoreflect.EnumType {
	return &file_runtime_v1_application_results_proto_enumTypes[2]
}

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

// Deprecated: Use ApplicationResultFailureCode.Descriptor instead.
func (ApplicationResultFailureCode) EnumDescriptor() ([]byte, []int) {
	return file_runtime_v1_application_results_proto_rawDescGZIP(), []int{2}
}

// Unknown, expired, and digest-mismatched pairs share the same top-level
// missing failure; the wire response never discloses which case occurred.
type GetApplicationResultRequest struct {
	state              protoimpl.MessageState `protogen:"open.v1"`
	CommandId          string                 `protobuf:"bytes,1,opt,name=command_id,json=commandId,proto3" json:"command_id,omitempty"`
	ExecutionRefDigest string                 `protobuf:"bytes,2,opt,name=execution_ref_digest,json=executionRefDigest,proto3" json:"execution_ref_digest,omitempty"`
	unknownFields      protoimpl.UnknownFields
	sizeCache          protoimpl.SizeCache
}

func (x *GetApplicationResultRequest) Reset() {
	*x = GetApplicationResultRequest{}
	mi := &file_runtime_v1_application_results_proto_msgTypes[0]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *GetApplicationResultRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*GetApplicationResultRequest) ProtoMessage() {}

func (x *GetApplicationResultRequest) ProtoReflect() protoreflect.Message {
	mi := &file_runtime_v1_application_results_proto_msgTypes[0]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use GetApplicationResultRequest.ProtoReflect.Descriptor instead.
func (*GetApplicationResultRequest) Descriptor() ([]byte, []int) {
	return file_runtime_v1_application_results_proto_rawDescGZIP(), []int{0}
}

func (x *GetApplicationResultRequest) GetCommandId() string {
	if x != nil {
		return x.CommandId
	}
	return ""
}

func (x *GetApplicationResultRequest) GetExecutionRefDigest() string {
	if x != nil {
		return x.ExecutionRefDigest
	}
	return ""
}

// ApplicationResult is the immutable terminal fact committed by Runtime with
// the application transaction. It contains only digests and a deterministic
// commit receipt, never Runtime-owned result payload or internal error text.
type ApplicationResult struct {
	state                protoimpl.MessageState       `protogen:"open.v1"`
	CommandId            string                       `protobuf:"bytes,1,opt,name=command_id,json=commandId,proto3" json:"command_id,omitempty"`
	ExecutionRefDigest   string                       `protobuf:"bytes,2,opt,name=execution_ref_digest,json=executionRefDigest,proto3" json:"execution_ref_digest,omitempty"`
	Outcome              ApplicationResultOutcome     `protobuf:"varint,3,opt,name=outcome,proto3,enum=nexuscrm.runtime.v1.ApplicationResultOutcome" json:"outcome,omitempty"`
	ResultDigest         string                       `protobuf:"bytes,4,opt,name=result_digest,json=resultDigest,proto3" json:"result_digest,omitempty"`
	RuntimeCommitReceipt string                       `protobuf:"bytes,5,opt,name=runtime_commit_receipt,json=runtimeCommitReceipt,proto3" json:"runtime_commit_receipt,omitempty"`
	FailureCode          ApplicationResultFailureCode `protobuf:"varint,6,opt,name=failure_code,json=failureCode,proto3,enum=nexuscrm.runtime.v1.ApplicationResultFailureCode" json:"failure_code,omitempty"`
	unknownFields        protoimpl.UnknownFields
	sizeCache            protoimpl.SizeCache
}

func (x *ApplicationResult) Reset() {
	*x = ApplicationResult{}
	mi := &file_runtime_v1_application_results_proto_msgTypes[1]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *ApplicationResult) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*ApplicationResult) ProtoMessage() {}

func (x *ApplicationResult) ProtoReflect() protoreflect.Message {
	mi := &file_runtime_v1_application_results_proto_msgTypes[1]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use ApplicationResult.ProtoReflect.Descriptor instead.
func (*ApplicationResult) Descriptor() ([]byte, []int) {
	return file_runtime_v1_application_results_proto_rawDescGZIP(), []int{1}
}

func (x *ApplicationResult) GetCommandId() string {
	if x != nil {
		return x.CommandId
	}
	return ""
}

func (x *ApplicationResult) GetExecutionRefDigest() string {
	if x != nil {
		return x.ExecutionRefDigest
	}
	return ""
}

func (x *ApplicationResult) GetOutcome() ApplicationResultOutcome {
	if x != nil {
		return x.Outcome
	}
	return ApplicationResultOutcome_APPLICATION_RESULT_OUTCOME_UNSPECIFIED
}

func (x *ApplicationResult) GetResultDigest() string {
	if x != nil {
		return x.ResultDigest
	}
	return ""
}

func (x *ApplicationResult) GetRuntimeCommitReceipt() string {
	if x != nil {
		return x.RuntimeCommitReceipt
	}
	return ""
}

func (x *ApplicationResult) GetFailureCode() ApplicationResultFailureCode {
	if x != nil {
		return x.FailureCode
	}
	return ApplicationResultFailureCode_APPLICATION_RESULT_FAILURE_CODE_UNSPECIFIED
}

type GetApplicationResultResponse struct {
	state              protoimpl.MessageState `protogen:"open.v1"`
	CommandId          string                 `protobuf:"bytes,1,opt,name=command_id,json=commandId,proto3" json:"command_id,omitempty"`
	ExecutionRefDigest string                 `protobuf:"bytes,2,opt,name=execution_ref_digest,json=executionRefDigest,proto3" json:"execution_ref_digest,omitempty"`
	State              ApplicationResultState `protobuf:"varint,3,opt,name=state,proto3,enum=nexuscrm.runtime.v1.ApplicationResultState" json:"state,omitempty"`
	// Present exactly when state is APPLICATION_RESULT_STATE_TERMINAL.
	Result        *ApplicationResult `protobuf:"bytes,4,opt,name=result,proto3" json:"result,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *GetApplicationResultResponse) Reset() {
	*x = GetApplicationResultResponse{}
	mi := &file_runtime_v1_application_results_proto_msgTypes[2]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *GetApplicationResultResponse) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*GetApplicationResultResponse) ProtoMessage() {}

func (x *GetApplicationResultResponse) ProtoReflect() protoreflect.Message {
	mi := &file_runtime_v1_application_results_proto_msgTypes[2]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use GetApplicationResultResponse.ProtoReflect.Descriptor instead.
func (*GetApplicationResultResponse) Descriptor() ([]byte, []int) {
	return file_runtime_v1_application_results_proto_rawDescGZIP(), []int{2}
}

func (x *GetApplicationResultResponse) GetCommandId() string {
	if x != nil {
		return x.CommandId
	}
	return ""
}

func (x *GetApplicationResultResponse) GetExecutionRefDigest() string {
	if x != nil {
		return x.ExecutionRefDigest
	}
	return ""
}

func (x *GetApplicationResultResponse) GetState() ApplicationResultState {
	if x != nil {
		return x.State
	}
	return ApplicationResultState_APPLICATION_RESULT_STATE_UNSPECIFIED
}

func (x *GetApplicationResultResponse) GetResult() *ApplicationResult {
	if x != nil {
		return x.Result
	}
	return nil
}

var File_runtime_v1_application_results_proto protoreflect.FileDescriptor

const file_runtime_v1_application_results_proto_rawDesc = "" +
	"\n" +
	"$runtime/v1/application_results.proto\x12\x13nexuscrm.runtime.v1\"n\n" +
	"\x1bGetApplicationResultRequest\x12\x1d\n" +
	"\n" +
	"command_id\x18\x01 \x01(\tR\tcommandId\x120\n" +
	"\x14execution_ref_digest\x18\x02 \x01(\tR\x12executionRefDigest\"\xde\x02\n" +
	"\x11ApplicationResult\x12\x1d\n" +
	"\n" +
	"command_id\x18\x01 \x01(\tR\tcommandId\x120\n" +
	"\x14execution_ref_digest\x18\x02 \x01(\tR\x12executionRefDigest\x12G\n" +
	"\aoutcome\x18\x03 \x01(\x0e2-.nexuscrm.runtime.v1.ApplicationResultOutcomeR\aoutcome\x12#\n" +
	"\rresult_digest\x18\x04 \x01(\tR\fresultDigest\x124\n" +
	"\x16runtime_commit_receipt\x18\x05 \x01(\tR\x14runtimeCommitReceipt\x12T\n" +
	"\ffailure_code\x18\x06 \x01(\x0e21.nexuscrm.runtime.v1.ApplicationResultFailureCodeR\vfailureCode\"\xf2\x01\n" +
	"\x1cGetApplicationResultResponse\x12\x1d\n" +
	"\n" +
	"command_id\x18\x01 \x01(\tR\tcommandId\x120\n" +
	"\x14execution_ref_digest\x18\x02 \x01(\tR\x12executionRefDigest\x12A\n" +
	"\x05state\x18\x03 \x01(\x0e2+.nexuscrm.runtime.v1.ApplicationResultStateR\x05state\x12>\n" +
	"\x06result\x18\x04 \x01(\v2&.nexuscrm.runtime.v1.ApplicationResultR\x06result*\x8f\x01\n" +
	"\x16ApplicationResultState\x12(\n" +
	"$APPLICATION_RESULT_STATE_UNSPECIFIED\x10\x00\x12$\n" +
	" APPLICATION_RESULT_STATE_PENDING\x10\x01\x12%\n" +
	"!APPLICATION_RESULT_STATE_TERMINAL\x10\x02*\xe3\x01\n" +
	"\x18ApplicationResultOutcome\x12*\n" +
	"&APPLICATION_RESULT_OUTCOME_UNSPECIFIED\x10\x00\x12&\n" +
	"\"APPLICATION_RESULT_OUTCOME_APPLIED\x10\x01\x12#\n" +
	"\x1fAPPLICATION_RESULT_OUTCOME_NOOP\x10\x02\x12'\n" +
	"#APPLICATION_RESULT_OUTCOME_REJECTED\x10\x03\x12%\n" +
	"!APPLICATION_RESULT_OUTCOME_FAILED\x10\x04*\xc7\x01\n" +
	"\x1cApplicationResultFailureCode\x12/\n" +
	"+APPLICATION_RESULT_FAILURE_CODE_UNSPECIFIED\x10\x00\x128\n" +
	"4APPLICATION_RESULT_FAILURE_CODE_APPLICATION_REJECTED\x10\x01\x12<\n" +
	"8APPLICATION_RESULT_FAILURE_CODE_RUNTIME_EXECUTION_FAILED\x10\x022\x97\x01\n" +
	"\x18ApplicationResultService\x12{\n" +
	"\x14GetApplicationResult\x120.nexuscrm.runtime.v1.GetApplicationResultRequest\x1a1.nexuscrm.runtime.v1.GetApplicationResultResponseBKZIgithub.com/pingcap-inc/nexuscrm-contract/wire-go/gen/runtime/v1;runtimev1b\x06proto3"

var (
	file_runtime_v1_application_results_proto_rawDescOnce sync.Once
	file_runtime_v1_application_results_proto_rawDescData []byte
)

func file_runtime_v1_application_results_proto_rawDescGZIP() []byte {
	file_runtime_v1_application_results_proto_rawDescOnce.Do(func() {
		file_runtime_v1_application_results_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_runtime_v1_application_results_proto_rawDesc), len(file_runtime_v1_application_results_proto_rawDesc)))
	})
	return file_runtime_v1_application_results_proto_rawDescData
}

var file_runtime_v1_application_results_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
var file_runtime_v1_application_results_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_runtime_v1_application_results_proto_goTypes = []any{
	(ApplicationResultState)(0),          // 0: nexuscrm.runtime.v1.ApplicationResultState
	(ApplicationResultOutcome)(0),        // 1: nexuscrm.runtime.v1.ApplicationResultOutcome
	(ApplicationResultFailureCode)(0),    // 2: nexuscrm.runtime.v1.ApplicationResultFailureCode
	(*GetApplicationResultRequest)(nil),  // 3: nexuscrm.runtime.v1.GetApplicationResultRequest
	(*ApplicationResult)(nil),            // 4: nexuscrm.runtime.v1.ApplicationResult
	(*GetApplicationResultResponse)(nil), // 5: nexuscrm.runtime.v1.GetApplicationResultResponse
}
var file_runtime_v1_application_results_proto_depIdxs = []int32{
	1, // 0: nexuscrm.runtime.v1.ApplicationResult.outcome:type_name -> nexuscrm.runtime.v1.ApplicationResultOutcome
	2, // 1: nexuscrm.runtime.v1.ApplicationResult.failure_code:type_name -> nexuscrm.runtime.v1.ApplicationResultFailureCode
	0, // 2: nexuscrm.runtime.v1.GetApplicationResultResponse.state:type_name -> nexuscrm.runtime.v1.ApplicationResultState
	4, // 3: nexuscrm.runtime.v1.GetApplicationResultResponse.result:type_name -> nexuscrm.runtime.v1.ApplicationResult
	3, // 4: nexuscrm.runtime.v1.ApplicationResultService.GetApplicationResult:input_type -> nexuscrm.runtime.v1.GetApplicationResultRequest
	5, // 5: nexuscrm.runtime.v1.ApplicationResultService.GetApplicationResult:output_type -> nexuscrm.runtime.v1.GetApplicationResultResponse
	5, // [5:6] is the sub-list for method output_type
	4, // [4:5] is the sub-list for method input_type
	4, // [4:4] is the sub-list for extension type_name
	4, // [4:4] is the sub-list for extension extendee
	0, // [0:4] is the sub-list for field type_name
}

func init() { file_runtime_v1_application_results_proto_init() }
func file_runtime_v1_application_results_proto_init() {
	if File_runtime_v1_application_results_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_runtime_v1_application_results_proto_rawDesc), len(file_runtime_v1_application_results_proto_rawDesc)),
			NumEnums:      3,
			NumMessages:   3,
			NumExtensions: 0,
			NumServices:   1,
		},
		GoTypes:           file_runtime_v1_application_results_proto_goTypes,
		DependencyIndexes: file_runtime_v1_application_results_proto_depIdxs,
		EnumInfos:         file_runtime_v1_application_results_proto_enumTypes,
		MessageInfos:      file_runtime_v1_application_results_proto_msgTypes,
	}.Build()
	File_runtime_v1_application_results_proto = out.File
	file_runtime_v1_application_results_proto_goTypes = nil
	file_runtime_v1_application_results_proto_depIdxs = nil
}
