// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.10
// 	protoc        v7.35.1
// source: envoy/config/filter/http/transcoder/v2/transcoder.proto

package transcoderv2

import (
	_ "github.com/cncf/xds/go/udpa/annotations"
	_ "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)
)

// [#next-free-field: 10]
type GrpcJsonTranscoder struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Types that are valid to be assigned to DescriptorSet:
	//
	//	*GrpcJsonTranscoder_ProtoDescriptor
	//	*GrpcJsonTranscoder_ProtoDescriptorBin
	DescriptorSet isGrpcJsonTranscoder_DescriptorSet `protobuf_oneof:"descriptor_set"`
	// A list of strings that
	// supplies the fully qualified service names (i.e. "package_name.service_name") that
	// the transcoder will translate. If the service name doesn't exist in “proto_descriptor“,
	// Envoy will fail at startup. The “proto_descriptor“ may contain more services than
	// the service names specified here, but they won't be translated.
	Services []string `protobuf:"bytes,2,rep,name=services,proto3" json:"services,omitempty"`
	// Control options for response JSON. These options are passed directly to
	// `JsonPrintOptions <https://developers.google.com/protocol-buffers/docs/reference/cpp/
	// google.protobuf.util.json_util#JsonPrintOptions>`_.
	PrintOptions *GrpcJsonTranscoder_PrintOptions `protobuf:"bytes,3,opt,name=print_options,json=printOptions,proto3" json:"print_options,omitempty"`
	// Whether to keep the incoming request route after the outgoing headers have been transformed to
	// the match the upstream gRPC service. Note: This means that routes for gRPC services that are
	// not transcoded cannot be used in combination with *match_incoming_request_route*.
	MatchIncomingRequestRoute bool `protobuf:"varint,5,opt,name=match_incoming_request_route,json=matchIncomingRequestRoute,proto3" json:"match_incoming_request_route,omitempty"`
	// A list of query parameters to be ignored for transcoding method mapping.
	// By default, the transcoder filter will not transcode a request if there are any
	// unknown/invalid query parameters.
	//
	// Example :
	//
	// .. code-block:: proto
	//
	//	service Bookstore {
	//	  rpc GetShelf(GetShelfRequest) returns (Shelf) {
	//	    option (google.api.http) = {
	//	      get: "/shelves/{shelf}"
	//	    };
	//	  }
	//	}
	//
	//	message GetShelfRequest {
	//	  int64 shelf = 1;
	//	}
	//
	//	message Shelf {}
	//
	// The request “/shelves/100?foo=bar“ will not be mapped to “GetShelf``` because variable
	// binding for “foo“ is not defined. Adding “foo“ to “ignored_query_parameters“ will allow
	// the same request to be mapped to “GetShelf“.
	IgnoredQueryParameters []string `protobuf:"bytes,6,rep,name=ignored_query_parameters,json=ignoredQueryParameters,proto3" json:"ignored_query_parameters,omitempty"`
	// Whether to route methods without the “google.api.http“ option.
	//
	// Example :
	//
	// .. code-block:: proto
	//
	//	package bookstore;
	//
	//	service Bookstore {
	//	  rpc GetShelf(GetShelfRequest) returns (Shelf) {}
	//	}
	//
	//	message GetShelfRequest {
	//	  int64 shelf = 1;
	//	}
	//
	//	message Shelf {}
	//
	// The client could “post“ a json body “{"shelf": 1234}“ with the path of
	// “/bookstore.Bookstore/GetShelfRequest“ to call “GetShelfRequest“.
	AutoMapping bool `protobuf:"varint,7,opt,name=auto_mapping,json=autoMapping,proto3" json:"auto_mapping,omitempty"`
	// Whether to ignore query parameters that cannot be mapped to a corresponding
	// protobuf field. Use this if you cannot control the query parameters and do
	// not know them beforehand. Otherwise use “ignored_query_parameters“.
	// Defaults to false.
	IgnoreUnknownQueryParameters bool `protobuf:"varint,8,opt,name=ignore_unknown_query_parameters,json=ignoreUnknownQueryParameters,proto3" json:"ignore_unknown_query_parameters,omitempty"`
	// Whether to convert gRPC status headers to JSON.
	// When trailer indicates a gRPC error and there was no HTTP body, take “google.rpc.Status“
	// from the “grpc-status-details-bin“ header and use it as JSON body.
	// If there was no such header, make “google.rpc.Status“ out of the “grpc-status“ and
	// “grpc-message“ headers.
	// The error details types must be present in the “proto_descriptor“.
	//
	// For example, if an upstream server replies with headers:
	//
	// .. code-block:: none
	//
	//	grpc-status: 5
	//	grpc-status-details-bin:
	//	    CAUaMwoqdHlwZS5nb29nbGVhcGlzLmNvbS9nb29nbGUucnBjLlJlcXVlc3RJbmZvEgUKA3ItMQ
	//
	// The “grpc-status-details-bin“ header contains a base64-encoded protobuf message
	// “google.rpc.Status“. It will be transcoded into:
	//
	// .. code-block:: none
	//
	//	HTTP/1.1 404 Not Found
	//	content-type: application/json
	//
	//	{"code":5,"details":[{"@type":"type.googleapis.com/google.rpc.RequestInfo","requestId":"r-1"}]}
	//
	// In order to transcode the message, the “google.rpc.RequestInfo“ type from
	// the “google/rpc/error_details.proto“ should be included in the configured
	// :ref:`proto descriptor set <config_grpc_json_generate_proto_descriptor_set>`.
	ConvertGrpcStatus bool `protobuf:"varint,9,opt,name=convert_grpc_status,json=convertGrpcStatus,proto3" json:"convert_grpc_status,omitempty"`
	unknownFields     protoimpl.UnknownFields
	sizeCache         protoimpl.SizeCache
}

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

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

func (*GrpcJsonTranscoder) ProtoMessage() {}

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

func (x *GrpcJsonTranscoder) GetDescriptorSet() isGrpcJsonTranscoder_DescriptorSet {
	if x != nil {
		return x.DescriptorSet
	}
	return nil
}

func (x *GrpcJsonTranscoder) GetProtoDescriptor() string {
	if x != nil {
		if x, ok := x.DescriptorSet.(*GrpcJsonTranscoder_ProtoDescriptor); ok {
			return x.ProtoDescriptor
		}
	}
	return ""
}

func (x *GrpcJsonTranscoder) GetProtoDescriptorBin() []byte {
	if x != nil {
		if x, ok := x.DescriptorSet.(*GrpcJsonTranscoder_ProtoDescriptorBin); ok {
			return x.ProtoDescriptorBin
		}
	}
	return nil
}

func (x *GrpcJsonTranscoder) GetServices() []string {
	if x != nil {
		return x.Services
	}
	return nil
}

func (x *GrpcJsonTranscoder) GetPrintOptions() *GrpcJsonTranscoder_PrintOptions {
	if x != nil {
		return x.PrintOptions
	}
	return nil
}

func (x *GrpcJsonTranscoder) GetMatchIncomingRequestRoute() bool {
	if x != nil {
		return x.MatchIncomingRequestRoute
	}
	return false
}

func (x *GrpcJsonTranscoder) GetIgnoredQueryParameters() []string {
	if x != nil {
		return x.IgnoredQueryParameters
	}
	return nil
}

func (x *GrpcJsonTranscoder) GetAutoMapping() bool {
	if x != nil {
		return x.AutoMapping
	}
	return false
}

func (x *GrpcJsonTranscoder) GetIgnoreUnknownQueryParameters() bool {
	if x != nil {
		return x.IgnoreUnknownQueryParameters
	}
	return false
}

func (x *GrpcJsonTranscoder) GetConvertGrpcStatus() bool {
	if x != nil {
		return x.ConvertGrpcStatus
	}
	return false
}

type isGrpcJsonTranscoder_DescriptorSet interface {
	isGrpcJsonTranscoder_DescriptorSet()
}

type GrpcJsonTranscoder_ProtoDescriptor struct {
	// Supplies the filename of
	// :ref:`the proto descriptor set <config_grpc_json_generate_proto_descriptor_set>` for the gRPC
	// services.
	ProtoDescriptor string `protobuf:"bytes,1,opt,name=proto_descriptor,json=protoDescriptor,proto3,oneof"`
}

type GrpcJsonTranscoder_ProtoDescriptorBin struct {
	// Supplies the binary content of
	// :ref:`the proto descriptor set <config_grpc_json_generate_proto_descriptor_set>` for the gRPC
	// services.
	ProtoDescriptorBin []byte `protobuf:"bytes,4,opt,name=proto_descriptor_bin,json=protoDescriptorBin,proto3,oneof"`
}

func (*GrpcJsonTranscoder_ProtoDescriptor) isGrpcJsonTranscoder_DescriptorSet() {}

func (*GrpcJsonTranscoder_ProtoDescriptorBin) isGrpcJsonTranscoder_DescriptorSet() {}

type GrpcJsonTranscoder_PrintOptions struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Whether to add spaces, line breaks and indentation to make the JSON
	// output easy to read. Defaults to false.
	AddWhitespace bool `protobuf:"varint,1,opt,name=add_whitespace,json=addWhitespace,proto3" json:"add_whitespace,omitempty"`
	// Whether to always print primitive fields. By default primitive
	// fields with default values will be omitted in JSON output. For
	// example, an int32 field set to 0 will be omitted. Setting this flag to
	// true will override the default behavior and print primitive fields
	// regardless of their values. Defaults to false.
	AlwaysPrintPrimitiveFields bool `protobuf:"varint,2,opt,name=always_print_primitive_fields,json=alwaysPrintPrimitiveFields,proto3" json:"always_print_primitive_fields,omitempty"`
	// Whether to always print enums as ints. By default they are rendered
	// as strings. Defaults to false.
	AlwaysPrintEnumsAsInts bool `protobuf:"varint,3,opt,name=always_print_enums_as_ints,json=alwaysPrintEnumsAsInts,proto3" json:"always_print_enums_as_ints,omitempty"`
	// Whether to preserve proto field names. By default protobuf will
	// generate JSON field names using the “json_name“ option, or lower camel case,
	// in that order. Setting this flag will preserve the original field names. Defaults to false.
	PreserveProtoFieldNames bool `protobuf:"varint,4,opt,name=preserve_proto_field_names,json=preserveProtoFieldNames,proto3" json:"preserve_proto_field_names,omitempty"`
	unknownFields           protoimpl.UnknownFields
	sizeCache               protoimpl.SizeCache
}

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

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

func (*GrpcJsonTranscoder_PrintOptions) ProtoMessage() {}

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

func (x *GrpcJsonTranscoder_PrintOptions) GetAddWhitespace() bool {
	if x != nil {
		return x.AddWhitespace
	}
	return false
}

func (x *GrpcJsonTranscoder_PrintOptions) GetAlwaysPrintPrimitiveFields() bool {
	if x != nil {
		return x.AlwaysPrintPrimitiveFields
	}
	return false
}

func (x *GrpcJsonTranscoder_PrintOptions) GetAlwaysPrintEnumsAsInts() bool {
	if x != nil {
		return x.AlwaysPrintEnumsAsInts
	}
	return false
}

func (x *GrpcJsonTranscoder_PrintOptions) GetPreserveProtoFieldNames() bool {
	if x != nil {
		return x.PreserveProtoFieldNames
	}
	return false
}

var File_envoy_config_filter_http_transcoder_v2_transcoder_proto protoreflect.FileDescriptor

const file_envoy_config_filter_http_transcoder_v2_transcoder_proto_rawDesc = "" +
	"\n" +
	"7envoy/config/filter/http/transcoder/v2/transcoder.proto\x12&envoy.config.filter.http.transcoder.v2\x1a\x1eudpa/annotations/migrate.proto\x1a\x1dudpa/annotations/status.proto\x1a\x17validate/validate.proto\"\xa9\x06\n" +
	"\x12GrpcJsonTranscoder\x12+\n" +
	"\x10proto_descriptor\x18\x01 \x01(\tH\x00R\x0fprotoDescriptor\x122\n" +
	"\x14proto_descriptor_bin\x18\x04 \x01(\fH\x00R\x12protoDescriptorBin\x12$\n" +
	"\bservices\x18\x02 \x03(\tB\b\xfaB\x05\x92\x01\x02\b\x01R\bservices\x12l\n" +
	"\rprint_options\x18\x03 \x01(\v2G.envoy.config.filter.http.transcoder.v2.GrpcJsonTranscoder.PrintOptionsR\fprintOptions\x12?\n" +
	"\x1cmatch_incoming_request_route\x18\x05 \x01(\bR\x19matchIncomingRequestRoute\x128\n" +
	"\x18ignored_query_parameters\x18\x06 \x03(\tR\x16ignoredQueryParameters\x12!\n" +
	"\fauto_mapping\x18\a \x01(\bR\vautoMapping\x12E\n" +
	"\x1fignore_unknown_query_parameters\x18\b \x01(\bR\x1cignoreUnknownQueryParameters\x12.\n" +
	"\x13convert_grpc_status\x18\t \x01(\bR\x11convertGrpcStatus\x1a\xf1\x01\n" +
	"\fPrintOptions\x12%\n" +
	"\x0eadd_whitespace\x18\x01 \x01(\bR\raddWhitespace\x12A\n" +
	"\x1dalways_print_primitive_fields\x18\x02 \x01(\bR\x1aalwaysPrintPrimitiveFields\x12:\n" +
	"\x1aalways_print_enums_as_ints\x18\x03 \x01(\bR\x16alwaysPrintEnumsAsInts\x12;\n" +
	"\x1apreserve_proto_field_names\x18\x04 \x01(\bR\x17preserveProtoFieldNamesB\x15\n" +
	"\x0edescriptor_set\x12\x03\xf8B\x01B\xea\x01\xf2\x98\xfe\x8f\x057\x125envoy.extensions.filters.http.grpc_json_transcoder.v3\xba\x80\xc8\xd1\x06\x02\x10\x01\n" +
	"4io.envoyproxy.envoy.config.filter.http.transcoder.v2B\x0fTranscoderProtoP\x01ZZgithub.com/envoyproxy/go-control-plane/envoy/config/filter/http/transcoder/v2;transcoderv2b\x06proto3"

var (
	file_envoy_config_filter_http_transcoder_v2_transcoder_proto_rawDescOnce sync.Once
	file_envoy_config_filter_http_transcoder_v2_transcoder_proto_rawDescData []byte
)

func file_envoy_config_filter_http_transcoder_v2_transcoder_proto_rawDescGZIP() []byte {
	file_envoy_config_filter_http_transcoder_v2_transcoder_proto_rawDescOnce.Do(func() {
		file_envoy_config_filter_http_transcoder_v2_transcoder_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_envoy_config_filter_http_transcoder_v2_transcoder_proto_rawDesc), len(file_envoy_config_filter_http_transcoder_v2_transcoder_proto_rawDesc)))
	})
	return file_envoy_config_filter_http_transcoder_v2_transcoder_proto_rawDescData
}

var file_envoy_config_filter_http_transcoder_v2_transcoder_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_envoy_config_filter_http_transcoder_v2_transcoder_proto_goTypes = []any{
	(*GrpcJsonTranscoder)(nil),              // 0: envoy.config.filter.http.transcoder.v2.GrpcJsonTranscoder
	(*GrpcJsonTranscoder_PrintOptions)(nil), // 1: envoy.config.filter.http.transcoder.v2.GrpcJsonTranscoder.PrintOptions
}
var file_envoy_config_filter_http_transcoder_v2_transcoder_proto_depIdxs = []int32{
	1, // 0: envoy.config.filter.http.transcoder.v2.GrpcJsonTranscoder.print_options:type_name -> envoy.config.filter.http.transcoder.v2.GrpcJsonTranscoder.PrintOptions
	1, // [1:1] is the sub-list for method output_type
	1, // [1:1] is the sub-list for method input_type
	1, // [1:1] is the sub-list for extension type_name
	1, // [1:1] is the sub-list for extension extendee
	0, // [0:1] is the sub-list for field type_name
}

func init() { file_envoy_config_filter_http_transcoder_v2_transcoder_proto_init() }
func file_envoy_config_filter_http_transcoder_v2_transcoder_proto_init() {
	if File_envoy_config_filter_http_transcoder_v2_transcoder_proto != nil {
		return
	}
	file_envoy_config_filter_http_transcoder_v2_transcoder_proto_msgTypes[0].OneofWrappers = []any{
		(*GrpcJsonTranscoder_ProtoDescriptor)(nil),
		(*GrpcJsonTranscoder_ProtoDescriptorBin)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_envoy_config_filter_http_transcoder_v2_transcoder_proto_rawDesc), len(file_envoy_config_filter_http_transcoder_v2_transcoder_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_envoy_config_filter_http_transcoder_v2_transcoder_proto_goTypes,
		DependencyIndexes: file_envoy_config_filter_http_transcoder_v2_transcoder_proto_depIdxs,
		MessageInfos:      file_envoy_config_filter_http_transcoder_v2_transcoder_proto_msgTypes,
	}.Build()
	File_envoy_config_filter_http_transcoder_v2_transcoder_proto = out.File
	file_envoy_config_filter_http_transcoder_v2_transcoder_proto_goTypes = nil
	file_envoy_config_filter_http_transcoder_v2_transcoder_proto_depIdxs = nil
}
