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

package runtimev1

import (
	v1 "github.com/pingcap-inc/nexuscrm-contract/wire-go/gen/common/v1"
	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)
)

type ReadAuditLogRequest struct {
	state              protoimpl.MessageState `protogen:"open.v1"`
	ObjectId           string                 `protobuf:"bytes,1,opt,name=object_id,json=objectId,proto3" json:"object_id,omitempty"`
	RecordId           string                 `protobuf:"bytes,2,opt,name=record_id,json=recordId,proto3" json:"record_id,omitempty"`
	Limit              uint32                 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
	Offset             uint64                 `protobuf:"varint,4,opt,name=offset,proto3" json:"offset,omitempty"`
	MinCatalogRevision *uint64                `protobuf:"varint,5,opt,name=min_catalog_revision,json=minCatalogRevision,proto3,oneof" json:"min_catalog_revision,omitempty"`
	unknownFields      protoimpl.UnknownFields
	sizeCache          protoimpl.SizeCache
}

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

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

func (*ReadAuditLogRequest) ProtoMessage() {}

func (x *ReadAuditLogRequest) ProtoReflect() protoreflect.Message {
	mi := &file_runtime_v1_audit_log_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 ReadAuditLogRequest.ProtoReflect.Descriptor instead.
func (*ReadAuditLogRequest) Descriptor() ([]byte, []int) {
	return file_runtime_v1_audit_log_proto_rawDescGZIP(), []int{0}
}

func (x *ReadAuditLogRequest) GetObjectId() string {
	if x != nil {
		return x.ObjectId
	}
	return ""
}

func (x *ReadAuditLogRequest) GetRecordId() string {
	if x != nil {
		return x.RecordId
	}
	return ""
}

func (x *ReadAuditLogRequest) GetLimit() uint32 {
	if x != nil {
		return x.Limit
	}
	return 0
}

func (x *ReadAuditLogRequest) GetOffset() uint64 {
	if x != nil {
		return x.Offset
	}
	return 0
}

func (x *ReadAuditLogRequest) GetMinCatalogRevision() uint64 {
	if x != nil && x.MinCatalogRevision != nil {
		return *x.MinCatalogRevision
	}
	return 0
}

type AuditLogRow struct {
	state            protoimpl.MessageState `protogen:"open.v1"`
	Id               string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	ObjectId         string                 `protobuf:"bytes,2,opt,name=object_id,json=objectId,proto3" json:"object_id,omitempty"`
	RecordId         string                 `protobuf:"bytes,3,opt,name=record_id,json=recordId,proto3" json:"record_id,omitempty"`
	FieldId          string                 `protobuf:"bytes,4,opt,name=field_id,json=fieldId,proto3" json:"field_id,omitempty"`
	OldValue         *string                `protobuf:"bytes,5,opt,name=old_value,json=oldValue,proto3,oneof" json:"old_value,omitempty"`
	NewValue         *string                `protobuf:"bytes,6,opt,name=new_value,json=newValue,proto3,oneof" json:"new_value,omitempty"`
	ChangedById      string                 `protobuf:"bytes,7,opt,name=changed_by_id,json=changedById,proto3" json:"changed_by_id,omitempty"`
	ChangedAt        string                 `protobuf:"bytes,8,opt,name=changed_at,json=changedAt,proto3" json:"changed_at,omitempty"`
	Action           string                 `protobuf:"bytes,9,opt,name=action,proto3" json:"action,omitempty"`
	ChangesJson      string                 `protobuf:"bytes,10,opt,name=changes_json,json=changesJson,proto3" json:"changes_json,omitempty"`
	Entrypoint       string                 `protobuf:"bytes,11,opt,name=entrypoint,proto3" json:"entrypoint,omitempty"`
	EntrypointDetail string                 `protobuf:"bytes,12,opt,name=entrypoint_detail,json=entrypointDetail,proto3" json:"entrypoint_detail,omitempty"`
	RequestId        string                 `protobuf:"bytes,13,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	TraceId          string                 `protobuf:"bytes,14,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"`
	SessionId        string                 `protobuf:"bytes,15,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	ClientIp         string                 `protobuf:"bytes,16,opt,name=client_ip,json=clientIp,proto3" json:"client_ip,omitempty"`
	ActualUserId     string                 `protobuf:"bytes,17,opt,name=actual_user_id,json=actualUserId,proto3" json:"actual_user_id,omitempty"`
	Outcome          string                 `protobuf:"bytes,18,opt,name=outcome,proto3" json:"outcome,omitempty"`
	ErrorCode        string                 `protobuf:"bytes,19,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"`
	unknownFields    protoimpl.UnknownFields
	sizeCache        protoimpl.SizeCache
}

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

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

func (*AuditLogRow) ProtoMessage() {}

func (x *AuditLogRow) ProtoReflect() protoreflect.Message {
	mi := &file_runtime_v1_audit_log_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 AuditLogRow.ProtoReflect.Descriptor instead.
func (*AuditLogRow) Descriptor() ([]byte, []int) {
	return file_runtime_v1_audit_log_proto_rawDescGZIP(), []int{1}
}

func (x *AuditLogRow) GetId() string {
	if x != nil {
		return x.Id
	}
	return ""
}

func (x *AuditLogRow) GetObjectId() string {
	if x != nil {
		return x.ObjectId
	}
	return ""
}

func (x *AuditLogRow) GetRecordId() string {
	if x != nil {
		return x.RecordId
	}
	return ""
}

func (x *AuditLogRow) GetFieldId() string {
	if x != nil {
		return x.FieldId
	}
	return ""
}

func (x *AuditLogRow) GetOldValue() string {
	if x != nil && x.OldValue != nil {
		return *x.OldValue
	}
	return ""
}

func (x *AuditLogRow) GetNewValue() string {
	if x != nil && x.NewValue != nil {
		return *x.NewValue
	}
	return ""
}

func (x *AuditLogRow) GetChangedById() string {
	if x != nil {
		return x.ChangedById
	}
	return ""
}

func (x *AuditLogRow) GetChangedAt() string {
	if x != nil {
		return x.ChangedAt
	}
	return ""
}

func (x *AuditLogRow) GetAction() string {
	if x != nil {
		return x.Action
	}
	return ""
}

func (x *AuditLogRow) GetChangesJson() string {
	if x != nil {
		return x.ChangesJson
	}
	return ""
}

func (x *AuditLogRow) GetEntrypoint() string {
	if x != nil {
		return x.Entrypoint
	}
	return ""
}

func (x *AuditLogRow) GetEntrypointDetail() string {
	if x != nil {
		return x.EntrypointDetail
	}
	return ""
}

func (x *AuditLogRow) GetRequestId() string {
	if x != nil {
		return x.RequestId
	}
	return ""
}

func (x *AuditLogRow) GetTraceId() string {
	if x != nil {
		return x.TraceId
	}
	return ""
}

func (x *AuditLogRow) GetSessionId() string {
	if x != nil {
		return x.SessionId
	}
	return ""
}

func (x *AuditLogRow) GetClientIp() string {
	if x != nil {
		return x.ClientIp
	}
	return ""
}

func (x *AuditLogRow) GetActualUserId() string {
	if x != nil {
		return x.ActualUserId
	}
	return ""
}

func (x *AuditLogRow) GetOutcome() string {
	if x != nil {
		return x.Outcome
	}
	return ""
}

func (x *AuditLogRow) GetErrorCode() string {
	if x != nil {
		return x.ErrorCode
	}
	return ""
}

type ReadAuditLogResponse struct {
	state         protoimpl.MessageState  `protogen:"open.v1"`
	Rows          []*AuditLogRow          `protobuf:"bytes,1,rep,name=rows,proto3" json:"rows,omitempty"`
	Receipts      *v1.ConsistencyReceipts `protobuf:"bytes,2,opt,name=receipts,proto3" json:"receipts,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ReadAuditLogResponse) ProtoMessage() {}

func (x *ReadAuditLogResponse) ProtoReflect() protoreflect.Message {
	mi := &file_runtime_v1_audit_log_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 ReadAuditLogResponse.ProtoReflect.Descriptor instead.
func (*ReadAuditLogResponse) Descriptor() ([]byte, []int) {
	return file_runtime_v1_audit_log_proto_rawDescGZIP(), []int{2}
}

func (x *ReadAuditLogResponse) GetRows() []*AuditLogRow {
	if x != nil {
		return x.Rows
	}
	return nil
}

func (x *ReadAuditLogResponse) GetReceipts() *v1.ConsistencyReceipts {
	if x != nil {
		return x.Receipts
	}
	return nil
}

var File_runtime_v1_audit_log_proto protoreflect.FileDescriptor

const file_runtime_v1_audit_log_proto_rawDesc = "" +
	"\n" +
	"\x1aruntime/v1/audit_log.proto\x12\x13nexuscrm.runtime.v1\x1a\x16common/v1/common.proto\"\xcd\x01\n" +
	"\x13ReadAuditLogRequest\x12\x1b\n" +
	"\tobject_id\x18\x01 \x01(\tR\bobjectId\x12\x1b\n" +
	"\trecord_id\x18\x02 \x01(\tR\brecordId\x12\x14\n" +
	"\x05limit\x18\x03 \x01(\rR\x05limit\x12\x16\n" +
	"\x06offset\x18\x04 \x01(\x04R\x06offset\x125\n" +
	"\x14min_catalog_revision\x18\x05 \x01(\x04H\x00R\x12minCatalogRevision\x88\x01\x01B\x17\n" +
	"\x15_min_catalog_revision\"\xf2\x04\n" +
	"\vAuditLogRow\x12\x0e\n" +
	"\x02id\x18\x01 \x01(\tR\x02id\x12\x1b\n" +
	"\tobject_id\x18\x02 \x01(\tR\bobjectId\x12\x1b\n" +
	"\trecord_id\x18\x03 \x01(\tR\brecordId\x12\x19\n" +
	"\bfield_id\x18\x04 \x01(\tR\afieldId\x12 \n" +
	"\told_value\x18\x05 \x01(\tH\x00R\boldValue\x88\x01\x01\x12 \n" +
	"\tnew_value\x18\x06 \x01(\tH\x01R\bnewValue\x88\x01\x01\x12\"\n" +
	"\rchanged_by_id\x18\a \x01(\tR\vchangedById\x12\x1d\n" +
	"\n" +
	"changed_at\x18\b \x01(\tR\tchangedAt\x12\x16\n" +
	"\x06action\x18\t \x01(\tR\x06action\x12!\n" +
	"\fchanges_json\x18\n" +
	" \x01(\tR\vchangesJson\x12\x1e\n" +
	"\n" +
	"entrypoint\x18\v \x01(\tR\n" +
	"entrypoint\x12+\n" +
	"\x11entrypoint_detail\x18\f \x01(\tR\x10entrypointDetail\x12\x1d\n" +
	"\n" +
	"request_id\x18\r \x01(\tR\trequestId\x12\x19\n" +
	"\btrace_id\x18\x0e \x01(\tR\atraceId\x12\x1d\n" +
	"\n" +
	"session_id\x18\x0f \x01(\tR\tsessionId\x12\x1b\n" +
	"\tclient_ip\x18\x10 \x01(\tR\bclientIp\x12$\n" +
	"\x0eactual_user_id\x18\x11 \x01(\tR\factualUserId\x12\x18\n" +
	"\aoutcome\x18\x12 \x01(\tR\aoutcome\x12\x1d\n" +
	"\n" +
	"error_code\x18\x13 \x01(\tR\terrorCodeB\f\n" +
	"\n" +
	"_old_valueB\f\n" +
	"\n" +
	"_new_value\"\x91\x01\n" +
	"\x14ReadAuditLogResponse\x124\n" +
	"\x04rows\x18\x01 \x03(\v2 .nexuscrm.runtime.v1.AuditLogRowR\x04rows\x12C\n" +
	"\breceipts\x18\x02 \x01(\v2'.nexuscrm.common.v1.ConsistencyReceiptsR\breceipts2z\n" +
	"\x13AuditLogReadService\x12c\n" +
	"\fReadAuditLog\x12(.nexuscrm.runtime.v1.ReadAuditLogRequest\x1a).nexuscrm.runtime.v1.ReadAuditLogResponseBKZIgithub.com/pingcap-inc/nexuscrm-contract/wire-go/gen/runtime/v1;runtimev1b\x06proto3"

var (
	file_runtime_v1_audit_log_proto_rawDescOnce sync.Once
	file_runtime_v1_audit_log_proto_rawDescData []byte
)

func file_runtime_v1_audit_log_proto_rawDescGZIP() []byte {
	file_runtime_v1_audit_log_proto_rawDescOnce.Do(func() {
		file_runtime_v1_audit_log_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_runtime_v1_audit_log_proto_rawDesc), len(file_runtime_v1_audit_log_proto_rawDesc)))
	})
	return file_runtime_v1_audit_log_proto_rawDescData
}

var file_runtime_v1_audit_log_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_runtime_v1_audit_log_proto_goTypes = []any{
	(*ReadAuditLogRequest)(nil),    // 0: nexuscrm.runtime.v1.ReadAuditLogRequest
	(*AuditLogRow)(nil),            // 1: nexuscrm.runtime.v1.AuditLogRow
	(*ReadAuditLogResponse)(nil),   // 2: nexuscrm.runtime.v1.ReadAuditLogResponse
	(*v1.ConsistencyReceipts)(nil), // 3: nexuscrm.common.v1.ConsistencyReceipts
}
var file_runtime_v1_audit_log_proto_depIdxs = []int32{
	1, // 0: nexuscrm.runtime.v1.ReadAuditLogResponse.rows:type_name -> nexuscrm.runtime.v1.AuditLogRow
	3, // 1: nexuscrm.runtime.v1.ReadAuditLogResponse.receipts:type_name -> nexuscrm.common.v1.ConsistencyReceipts
	0, // 2: nexuscrm.runtime.v1.AuditLogReadService.ReadAuditLog:input_type -> nexuscrm.runtime.v1.ReadAuditLogRequest
	2, // 3: nexuscrm.runtime.v1.AuditLogReadService.ReadAuditLog:output_type -> nexuscrm.runtime.v1.ReadAuditLogResponse
	3, // [3:4] is the sub-list for method output_type
	2, // [2:3] is the sub-list for method input_type
	2, // [2:2] is the sub-list for extension type_name
	2, // [2:2] is the sub-list for extension extendee
	0, // [0:2] is the sub-list for field type_name
}

func init() { file_runtime_v1_audit_log_proto_init() }
func file_runtime_v1_audit_log_proto_init() {
	if File_runtime_v1_audit_log_proto != nil {
		return
	}
	file_runtime_v1_audit_log_proto_msgTypes[0].OneofWrappers = []any{}
	file_runtime_v1_audit_log_proto_msgTypes[1].OneofWrappers = []any{}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_runtime_v1_audit_log_proto_rawDesc), len(file_runtime_v1_audit_log_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   3,
			NumExtensions: 0,
			NumServices:   1,
		},
		GoTypes:           file_runtime_v1_audit_log_proto_goTypes,
		DependencyIndexes: file_runtime_v1_audit_log_proto_depIdxs,
		MessageInfos:      file_runtime_v1_audit_log_proto_msgTypes,
	}.Build()
	File_runtime_v1_audit_log_proto = out.File
	file_runtime_v1_audit_log_proto_goTypes = nil
	file_runtime_v1_audit_log_proto_depIdxs = nil
}
