// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.10
// 	protoc        v6.33.2
// source: envoy/extensions/filters/network/generic_proxy/action/v3/action.proto

package actionv3

import (
	_ "github.com/cncf/xds/go/udpa/annotations"
	_ "github.com/cncf/xds/go/xds/annotations/v3"
	v3 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
	v31 "github.com/envoyproxy/go-control-plane/envoy/config/route/v3"
	_ "github.com/envoyproxy/protoc-gen-validate/validate"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	anypb "google.golang.org/protobuf/types/known/anypb"
	durationpb "google.golang.org/protobuf/types/known/durationpb"
	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 route match action.
// [#next-free-field: 8]
type RouteAction struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The name of the route action. This should be unique across all route actions.
	Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"`
	// Types that are valid to be assigned to ClusterSpecifier:
	//
	//	*RouteAction_Cluster
	//	*RouteAction_WeightedClusters
	ClusterSpecifier isRouteAction_ClusterSpecifier `protobuf_oneof:"cluster_specifier"`
	// Route metadata.
	Metadata *v3.Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// Route level config for L7 generic filters. The key should be the related :ref:`extension name
	// <envoy_v3_api_field_config.core.v3.TypedExtensionConfig.name>` in the :ref:`generic filters
	// <envoy_v3_api_field_extensions.filters.network.generic_proxy.v3.GenericProxy.filters>`.
	PerFilterConfig map[string]*anypb.Any `protobuf:"bytes,4,rep,name=per_filter_config,json=perFilterConfig,proto3" json:"per_filter_config,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
	// Specifies the upstream timeout for the route. If not specified, the default is 15s. This
	// spans between the point at which the entire downstream request (i.e. end-of-stream) has been
	// processed and when the upstream response has been completely processed. A value of 0 will
	// disable the route's timeout.
	Timeout *durationpb.Duration `protobuf:"bytes,6,opt,name=timeout,proto3" json:"timeout,omitempty"`
	// Specifies the retry policy for the route. If not specified, then no retries will be performed.
	//
	// .. note::
	//
	//	Only simplest retry policy is supported and only ``num_retries`` field is used for generic
	//	proxy. The default value for ``num_retries`` is 1 means that the request will be tried once
	//	and no additional retries will be performed.
	RetryPolicy   *v3.RetryPolicy `protobuf:"bytes,7,opt,name=retry_policy,json=retryPolicy,proto3" json:"retry_policy,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*RouteAction) ProtoMessage() {}

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

func (x *RouteAction) GetName() string {
	if x != nil {
		return x.Name
	}
	return ""
}

func (x *RouteAction) GetClusterSpecifier() isRouteAction_ClusterSpecifier {
	if x != nil {
		return x.ClusterSpecifier
	}
	return nil
}

func (x *RouteAction) GetCluster() string {
	if x != nil {
		if x, ok := x.ClusterSpecifier.(*RouteAction_Cluster); ok {
			return x.Cluster
		}
	}
	return ""
}

func (x *RouteAction) GetWeightedClusters() *v31.WeightedCluster {
	if x != nil {
		if x, ok := x.ClusterSpecifier.(*RouteAction_WeightedClusters); ok {
			return x.WeightedClusters
		}
	}
	return nil
}

func (x *RouteAction) GetMetadata() *v3.Metadata {
	if x != nil {
		return x.Metadata
	}
	return nil
}

func (x *RouteAction) GetPerFilterConfig() map[string]*anypb.Any {
	if x != nil {
		return x.PerFilterConfig
	}
	return nil
}

func (x *RouteAction) GetTimeout() *durationpb.Duration {
	if x != nil {
		return x.Timeout
	}
	return nil
}

func (x *RouteAction) GetRetryPolicy() *v3.RetryPolicy {
	if x != nil {
		return x.RetryPolicy
	}
	return nil
}

type isRouteAction_ClusterSpecifier interface {
	isRouteAction_ClusterSpecifier()
}

type RouteAction_Cluster struct {
	// Indicates the upstream cluster to which the request should be routed.
	Cluster string `protobuf:"bytes,1,opt,name=cluster,proto3,oneof"`
}

type RouteAction_WeightedClusters struct {
	// [#not-implemented-hide:]
	// Multiple upstream clusters can be specified for a given route. The request is routed to one
	// of the upstream clusters based on weights assigned to each cluster.
	// Currently ClusterWeight only supports the name and weight fields.
	WeightedClusters *v31.WeightedCluster `protobuf:"bytes,2,opt,name=weighted_clusters,json=weightedClusters,proto3,oneof"`
}

func (*RouteAction_Cluster) isRouteAction_ClusterSpecifier() {}

func (*RouteAction_WeightedClusters) isRouteAction_ClusterSpecifier() {}

var File_envoy_extensions_filters_network_generic_proxy_action_v3_action_proto protoreflect.FileDescriptor

const file_envoy_extensions_filters_network_generic_proxy_action_v3_action_proto_rawDesc = "" +
	"\n" +
	"Eenvoy/extensions/filters/network/generic_proxy/action/v3/action.proto\x128envoy.extensions.filters.network.generic_proxy.action.v3\x1a\x1fenvoy/config/core/v3/base.proto\x1a,envoy/config/route/v3/route_components.proto\x1a\x19google/protobuf/any.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fxds/annotations/v3/status.proto\x1a\x1dudpa/annotations/status.proto\x1a\x17validate/validate.proto\"\xc8\x04\n" +
	"\vRouteAction\x12\x12\n" +
	"\x04name\x18\x05 \x01(\tR\x04name\x12\x1a\n" +
	"\acluster\x18\x01 \x01(\tH\x00R\acluster\x12U\n" +
	"\x11weighted_clusters\x18\x02 \x01(\v2&.envoy.config.route.v3.WeightedClusterH\x00R\x10weightedClusters\x12:\n" +
	"\bmetadata\x18\x03 \x01(\v2\x1e.envoy.config.core.v3.MetadataR\bmetadata\x12\x86\x01\n" +
	"\x11per_filter_config\x18\x04 \x03(\v2Z.envoy.extensions.filters.network.generic_proxy.action.v3.RouteAction.PerFilterConfigEntryR\x0fperFilterConfig\x123\n" +
	"\atimeout\x18\x06 \x01(\v2\x19.google.protobuf.DurationR\atimeout\x12D\n" +
	"\fretry_policy\x18\a \x01(\v2!.envoy.config.core.v3.RetryPolicyR\vretryPolicy\x1aX\n" +
	"\x14PerFilterConfigEntry\x12\x10\n" +
	"\x03key\x18\x01 \x01(\tR\x03key\x12*\n" +
	"\x05value\x18\x02 \x01(\v2\x14.google.protobuf.AnyR\x05value:\x028\x01B\x18\n" +
	"\x11cluster_specifier\x12\x03\xf8B\x01B\xd1\x01\xba\x80\xc8\xd1\x06\x02\x10\x02\xd2Ƥ\xe1\x06\x02\b\x01\n" +
	"Fio.envoyproxy.envoy.extensions.filters.network.generic_proxy.action.v3B\vActionProtoP\x01Zhgithub.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/generic_proxy/action/v3;actionv3b\x06proto3"

var (
	file_envoy_extensions_filters_network_generic_proxy_action_v3_action_proto_rawDescOnce sync.Once
	file_envoy_extensions_filters_network_generic_proxy_action_v3_action_proto_rawDescData []byte
)

func file_envoy_extensions_filters_network_generic_proxy_action_v3_action_proto_rawDescGZIP() []byte {
	file_envoy_extensions_filters_network_generic_proxy_action_v3_action_proto_rawDescOnce.Do(func() {
		file_envoy_extensions_filters_network_generic_proxy_action_v3_action_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_envoy_extensions_filters_network_generic_proxy_action_v3_action_proto_rawDesc), len(file_envoy_extensions_filters_network_generic_proxy_action_v3_action_proto_rawDesc)))
	})
	return file_envoy_extensions_filters_network_generic_proxy_action_v3_action_proto_rawDescData
}

var file_envoy_extensions_filters_network_generic_proxy_action_v3_action_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_envoy_extensions_filters_network_generic_proxy_action_v3_action_proto_goTypes = []any{
	(*RouteAction)(nil),         // 0: envoy.extensions.filters.network.generic_proxy.action.v3.RouteAction
	nil,                         // 1: envoy.extensions.filters.network.generic_proxy.action.v3.RouteAction.PerFilterConfigEntry
	(*v31.WeightedCluster)(nil), // 2: envoy.config.route.v3.WeightedCluster
	(*v3.Metadata)(nil),         // 3: envoy.config.core.v3.Metadata
	(*durationpb.Duration)(nil), // 4: google.protobuf.Duration
	(*v3.RetryPolicy)(nil),      // 5: envoy.config.core.v3.RetryPolicy
	(*anypb.Any)(nil),           // 6: google.protobuf.Any
}
var file_envoy_extensions_filters_network_generic_proxy_action_v3_action_proto_depIdxs = []int32{
	2, // 0: envoy.extensions.filters.network.generic_proxy.action.v3.RouteAction.weighted_clusters:type_name -> envoy.config.route.v3.WeightedCluster
	3, // 1: envoy.extensions.filters.network.generic_proxy.action.v3.RouteAction.metadata:type_name -> envoy.config.core.v3.Metadata
	1, // 2: envoy.extensions.filters.network.generic_proxy.action.v3.RouteAction.per_filter_config:type_name -> envoy.extensions.filters.network.generic_proxy.action.v3.RouteAction.PerFilterConfigEntry
	4, // 3: envoy.extensions.filters.network.generic_proxy.action.v3.RouteAction.timeout:type_name -> google.protobuf.Duration
	5, // 4: envoy.extensions.filters.network.generic_proxy.action.v3.RouteAction.retry_policy:type_name -> envoy.config.core.v3.RetryPolicy
	6, // 5: envoy.extensions.filters.network.generic_proxy.action.v3.RouteAction.PerFilterConfigEntry.value:type_name -> google.protobuf.Any
	6, // [6:6] is the sub-list for method output_type
	6, // [6:6] is the sub-list for method input_type
	6, // [6:6] is the sub-list for extension type_name
	6, // [6:6] is the sub-list for extension extendee
	0, // [0:6] is the sub-list for field type_name
}

func init() { file_envoy_extensions_filters_network_generic_proxy_action_v3_action_proto_init() }
func file_envoy_extensions_filters_network_generic_proxy_action_v3_action_proto_init() {
	if File_envoy_extensions_filters_network_generic_proxy_action_v3_action_proto != nil {
		return
	}
	file_envoy_extensions_filters_network_generic_proxy_action_v3_action_proto_msgTypes[0].OneofWrappers = []any{
		(*RouteAction_Cluster)(nil),
		(*RouteAction_WeightedClusters)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_envoy_extensions_filters_network_generic_proxy_action_v3_action_proto_rawDesc), len(file_envoy_extensions_filters_network_generic_proxy_action_v3_action_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_envoy_extensions_filters_network_generic_proxy_action_v3_action_proto_goTypes,
		DependencyIndexes: file_envoy_extensions_filters_network_generic_proxy_action_v3_action_proto_depIdxs,
		MessageInfos:      file_envoy_extensions_filters_network_generic_proxy_action_v3_action_proto_msgTypes,
	}.Build()
	File_envoy_extensions_filters_network_generic_proxy_action_v3_action_proto = out.File
	file_envoy_extensions_filters_network_generic_proxy_action_v3_action_proto_goTypes = nil
	file_envoy_extensions_filters_network_generic_proxy_action_v3_action_proto_depIdxs = nil
}
