// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.10
// 	protoc        v7.35.1
// source: envoy/extensions/content_parsers/json/v3/json_content_parser.proto

package jsonv3

import (
	_ "github.com/cncf/xds/go/udpa/annotations"
	_ "github.com/cncf/xds/go/xds/annotations/v3"
	v3 "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/json_to_metadata/v3"
	_ "github.com/envoyproxy/protoc-gen-validate/validate"
	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)
)

// Configuration for the JSON content parser.
type JsonContentParser struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The rules to apply for extracting values from JSON content.
	// Rules are evaluated in order for each content item provided.
	// At least one rule must be specified.
	Rules         []*JsonContentParser_RuleConfig `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*JsonContentParser) ProtoMessage() {}

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

func (x *JsonContentParser) GetRules() []*JsonContentParser_RuleConfig {
	if x != nil {
		return x.Rules
	}
	return nil
}

// Configuration for a single rule with its processing behavior.
type JsonContentParser_RuleConfig struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The json-to-metadata rule to apply for extracting values from JSON content.
	// See :ref:`json_to_metadata rule <envoy_v3_api_msg_extensions.filters.http.json_to_metadata.v3.JsonToMetadata.Rule>`
	// for available configuration options including selectors, on_present, on_missing, on_error actions.
	Rule *v3.JsonToMetadata_Rule `protobuf:"bytes,1,opt,name=rule,proto3" json:"rule,omitempty"`
	// Controls how many times this rule should successfully match before stopping evaluation
	// of this rule for subsequent content items.
	//
	//   - If set to 0 (default): This rule is evaluated against all content items provided.
	//     Later matches may overwrite earlier values (unless
	//     :ref:`preserve_existing_metadata_value <envoy_v3_api_field_extensions.filters.http.json_to_metadata.v3.JsonToMetadata.KeyValuePair.preserve_existing_metadata_value>`
	//     is set in the rule), effectively extracting the LAST occurrence.
	//
	//   - If set to 1: Stop evaluating this rule after the first successful match.
	//     This is useful for extracting values that appear early in the stream
	//     to avoid unnecessary processing of subsequent content.
	//
	//   - If set to N > 1: Reserved for future use (e.g., aggregating multiple values).
	//     Values > 1 are currently rejected to prevent behavioral changes when this feature is implemented.
	//
	// Example use cases:
	//
	//   - Extract model name from early content: “stop_processing_after_matches: 1“
	//     (Stops checking this rule after first match, doesn't process remaining content for this rule)
	//
	//   - Extract token usage from final content: “stop_processing_after_matches: 0“
	//     (Processes all content items, extracts value from the last one that contains it)
	StopProcessingAfterMatches uint32 `protobuf:"varint,2,opt,name=stop_processing_after_matches,json=stopProcessingAfterMatches,proto3" json:"stop_processing_after_matches,omitempty"`
	unknownFields              protoimpl.UnknownFields
	sizeCache                  protoimpl.SizeCache
}

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

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

func (*JsonContentParser_RuleConfig) ProtoMessage() {}

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

func (x *JsonContentParser_RuleConfig) GetRule() *v3.JsonToMetadata_Rule {
	if x != nil {
		return x.Rule
	}
	return nil
}

func (x *JsonContentParser_RuleConfig) GetStopProcessingAfterMatches() uint32 {
	if x != nil {
		return x.StopProcessingAfterMatches
	}
	return 0
}

var File_envoy_extensions_content_parsers_json_v3_json_content_parser_proto protoreflect.FileDescriptor

const file_envoy_extensions_content_parsers_json_v3_json_content_parser_proto_rawDesc = "" +
	"\n" +
	"Benvoy/extensions/content_parsers/json/v3/json_content_parser.proto\x12(envoy.extensions.content_parsers.json.v3\x1aHenvoy/extensions/filters/http/json_to_metadata/v3/json_to_metadata.proto\x1a\x1fxds/annotations/v3/status.proto\x1a\x1dudpa/annotations/status.proto\x1a\x17validate/validate.proto\"\xbc\x02\n" +
	"\x11JsonContentParser\x12f\n" +
	"\x05rules\x18\x01 \x03(\v2F.envoy.extensions.content_parsers.json.v3.JsonContentParser.RuleConfigB\b\xfaB\x05\x92\x01\x02\b\x01R\x05rules\x1a\xbe\x01\n" +
	"\n" +
	"RuleConfig\x12d\n" +
	"\x04rule\x18\x01 \x01(\v2F.envoy.extensions.filters.http.json_to_metadata.v3.JsonToMetadata.RuleB\b\xfaB\x05\x8a\x01\x02\x10\x01R\x04rule\x12J\n" +
	"\x1dstop_processing_after_matches\x18\x02 \x01(\rB\a\xfaB\x04*\x02\x18\x01R\x1astopProcessingAfterMatchesB\xba\x01\xba\x80\xc8\xd1\x06\x02\x10\x02\xd2Ƥ\xe1\x06\x02\b\x01\n" +
	"6io.envoyproxy.envoy.extensions.content_parsers.json.v3B\x16JsonContentParserProtoP\x01ZVgithub.com/envoyproxy/go-control-plane/envoy/extensions/content_parsers/json/v3;jsonv3b\x06proto3"

var (
	file_envoy_extensions_content_parsers_json_v3_json_content_parser_proto_rawDescOnce sync.Once
	file_envoy_extensions_content_parsers_json_v3_json_content_parser_proto_rawDescData []byte
)

func file_envoy_extensions_content_parsers_json_v3_json_content_parser_proto_rawDescGZIP() []byte {
	file_envoy_extensions_content_parsers_json_v3_json_content_parser_proto_rawDescOnce.Do(func() {
		file_envoy_extensions_content_parsers_json_v3_json_content_parser_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_envoy_extensions_content_parsers_json_v3_json_content_parser_proto_rawDesc), len(file_envoy_extensions_content_parsers_json_v3_json_content_parser_proto_rawDesc)))
	})
	return file_envoy_extensions_content_parsers_json_v3_json_content_parser_proto_rawDescData
}

var file_envoy_extensions_content_parsers_json_v3_json_content_parser_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_envoy_extensions_content_parsers_json_v3_json_content_parser_proto_goTypes = []any{
	(*JsonContentParser)(nil),            // 0: envoy.extensions.content_parsers.json.v3.JsonContentParser
	(*JsonContentParser_RuleConfig)(nil), // 1: envoy.extensions.content_parsers.json.v3.JsonContentParser.RuleConfig
	(*v3.JsonToMetadata_Rule)(nil),       // 2: envoy.extensions.filters.http.json_to_metadata.v3.JsonToMetadata.Rule
}
var file_envoy_extensions_content_parsers_json_v3_json_content_parser_proto_depIdxs = []int32{
	1, // 0: envoy.extensions.content_parsers.json.v3.JsonContentParser.rules:type_name -> envoy.extensions.content_parsers.json.v3.JsonContentParser.RuleConfig
	2, // 1: envoy.extensions.content_parsers.json.v3.JsonContentParser.RuleConfig.rule:type_name -> envoy.extensions.filters.http.json_to_metadata.v3.JsonToMetadata.Rule
	2, // [2:2] is the sub-list for method output_type
	2, // [2:2] 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_envoy_extensions_content_parsers_json_v3_json_content_parser_proto_init() }
func file_envoy_extensions_content_parsers_json_v3_json_content_parser_proto_init() {
	if File_envoy_extensions_content_parsers_json_v3_json_content_parser_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_envoy_extensions_content_parsers_json_v3_json_content_parser_proto_rawDesc), len(file_envoy_extensions_content_parsers_json_v3_json_content_parser_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_envoy_extensions_content_parsers_json_v3_json_content_parser_proto_goTypes,
		DependencyIndexes: file_envoy_extensions_content_parsers_json_v3_json_content_parser_proto_depIdxs,
		MessageInfos:      file_envoy_extensions_content_parsers_json_v3_json_content_parser_proto_msgTypes,
	}.Build()
	File_envoy_extensions_content_parsers_json_v3_json_content_parser_proto = out.File
	file_envoy_extensions_content_parsers_json_v3_json_content_parser_proto_goTypes = nil
	file_envoy_extensions_content_parsers_json_v3_json_content_parser_proto_depIdxs = nil
}
