// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.6
// 	protoc        v3.21.12
// source: yandex/cloud/apploadbalancer/v1/logging.proto

package apploadbalancer

import (
	_ "github.com/yandex-cloud/go-genproto/yandex/cloud"
	code "google.golang.org/genproto/googleapis/rpc/code"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
	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 HttpCodeInterval int32

const (
	HttpCodeInterval_HTTP_CODE_INTERVAL_UNSPECIFIED HttpCodeInterval = 0
	HttpCodeInterval_HTTP_1XX                       HttpCodeInterval = 1
	HttpCodeInterval_HTTP_2XX                       HttpCodeInterval = 2
	HttpCodeInterval_HTTP_3XX                       HttpCodeInterval = 3
	HttpCodeInterval_HTTP_4XX                       HttpCodeInterval = 4
	HttpCodeInterval_HTTP_5XX                       HttpCodeInterval = 5
	HttpCodeInterval_HTTP_ALL                       HttpCodeInterval = 6
)

// Enum value maps for HttpCodeInterval.
var (
	HttpCodeInterval_name = map[int32]string{
		0: "HTTP_CODE_INTERVAL_UNSPECIFIED",
		1: "HTTP_1XX",
		2: "HTTP_2XX",
		3: "HTTP_3XX",
		4: "HTTP_4XX",
		5: "HTTP_5XX",
		6: "HTTP_ALL",
	}
	HttpCodeInterval_value = map[string]int32{
		"HTTP_CODE_INTERVAL_UNSPECIFIED": 0,
		"HTTP_1XX":                       1,
		"HTTP_2XX":                       2,
		"HTTP_3XX":                       3,
		"HTTP_4XX":                       4,
		"HTTP_5XX":                       5,
		"HTTP_ALL":                       6,
	}
)

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

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

func (HttpCodeInterval) Descriptor() protoreflect.EnumDescriptor {
	return file_yandex_cloud_apploadbalancer_v1_logging_proto_enumTypes[0].Descriptor()
}

func (HttpCodeInterval) Type() protoreflect.EnumType {
	return &file_yandex_cloud_apploadbalancer_v1_logging_proto_enumTypes[0]
}

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

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

// LogDiscardRule discards a fraction of logs with certain codes.
// If neither codes or intervals are provided, rule applies to all logs.
type LogDiscardRule struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// HTTP codes that should be discarded.
	HttpCodes []int64 `protobuf:"varint,1,rep,packed,name=http_codes,json=httpCodes,proto3" json:"http_codes,omitempty"`
	// Groups of HTTP codes like 4xx that should be discarded.
	HttpCodeIntervals []HttpCodeInterval `protobuf:"varint,2,rep,packed,name=http_code_intervals,json=httpCodeIntervals,proto3,enum=yandex.cloud.apploadbalancer.v1.HttpCodeInterval" json:"http_code_intervals,omitempty"`
	// GRPC codes that should be discarded
	GrpcCodes []code.Code `protobuf:"varint,3,rep,packed,name=grpc_codes,json=grpcCodes,proto3,enum=google.rpc.Code" json:"grpc_codes,omitempty"`
	// Percent of logs to be discarded: 0 - keep all, 100 or unset - discard all
	DiscardPercent *wrapperspb.Int64Value `protobuf:"bytes,4,opt,name=discard_percent,json=discardPercent,proto3" json:"discard_percent,omitempty"`
	unknownFields  protoimpl.UnknownFields
	sizeCache      protoimpl.SizeCache
}

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

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

func (*LogDiscardRule) ProtoMessage() {}

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

func (x *LogDiscardRule) GetHttpCodes() []int64 {
	if x != nil {
		return x.HttpCodes
	}
	return nil
}

func (x *LogDiscardRule) GetHttpCodeIntervals() []HttpCodeInterval {
	if x != nil {
		return x.HttpCodeIntervals
	}
	return nil
}

func (x *LogDiscardRule) GetGrpcCodes() []code.Code {
	if x != nil {
		return x.GrpcCodes
	}
	return nil
}

func (x *LogDiscardRule) GetDiscardPercent() *wrapperspb.Int64Value {
	if x != nil {
		return x.DiscardPercent
	}
	return nil
}

type LogOptions struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Cloud Logging log group ID to store access logs.
	// If not set then logs will be stored in default log group for the folder
	// where load balancer located.
	LogGroupId string `protobuf:"bytes,1,opt,name=log_group_id,json=logGroupId,proto3" json:"log_group_id,omitempty"`
	// ordered list of rules, first matching rule applies
	DiscardRules []*LogDiscardRule `protobuf:"bytes,2,rep,name=discard_rules,json=discardRules,proto3" json:"discard_rules,omitempty"`
	// Do not send logs to Cloud Logging log group.
	Disable       bool `protobuf:"varint,3,opt,name=disable,proto3" json:"disable,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*LogOptions) ProtoMessage() {}

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

func (x *LogOptions) GetLogGroupId() string {
	if x != nil {
		return x.LogGroupId
	}
	return ""
}

func (x *LogOptions) GetDiscardRules() []*LogDiscardRule {
	if x != nil {
		return x.DiscardRules
	}
	return nil
}

func (x *LogOptions) GetDisable() bool {
	if x != nil {
		return x.Disable
	}
	return false
}

var File_yandex_cloud_apploadbalancer_v1_logging_proto protoreflect.FileDescriptor

const file_yandex_cloud_apploadbalancer_v1_logging_proto_rawDesc = "" +
	"\n" +
	"-yandex/cloud/apploadbalancer/v1/logging.proto\x12\x1fyandex.cloud.apploadbalancer.v1\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1dyandex/cloud/validation.proto\x1a\x15google/rpc/code.proto\"\xa1\x02\n" +
	"\x0eLogDiscardRule\x12*\n" +
	"\n" +
	"http_codes\x18\x01 \x03(\x03B\v\xfa\xc71\a100-599R\thttpCodes\x12a\n" +
	"\x13http_code_intervals\x18\x02 \x03(\x0e21.yandex.cloud.apploadbalancer.v1.HttpCodeIntervalR\x11httpCodeIntervals\x12/\n" +
	"\n" +
	"grpc_codes\x18\x03 \x03(\x0e2\x10.google.rpc.CodeR\tgrpcCodes\x12O\n" +
	"\x0fdiscard_percent\x18\x04 \x01(\v2\x1b.google.protobuf.Int64ValueB\t\xfa\xc71\x050-100R\x0ediscardPercent\"\x9e\x01\n" +
	"\n" +
	"LogOptions\x12 \n" +
	"\flog_group_id\x18\x01 \x01(\tR\n" +
	"logGroupId\x12T\n" +
	"\rdiscard_rules\x18\x02 \x03(\v2/.yandex.cloud.apploadbalancer.v1.LogDiscardRuleR\fdiscardRules\x12\x18\n" +
	"\adisable\x18\x03 \x01(\bR\adisable*\x8a\x01\n" +
	"\x10HttpCodeInterval\x12\"\n" +
	"\x1eHTTP_CODE_INTERVAL_UNSPECIFIED\x10\x00\x12\f\n" +
	"\bHTTP_1XX\x10\x01\x12\f\n" +
	"\bHTTP_2XX\x10\x02\x12\f\n" +
	"\bHTTP_3XX\x10\x03\x12\f\n" +
	"\bHTTP_4XX\x10\x04\x12\f\n" +
	"\bHTTP_5XX\x10\x05\x12\f\n" +
	"\bHTTP_ALL\x10\x06Bz\n" +
	"#yandex.cloud.api.apploadbalancer.v1ZSgithub.com/yandex-cloud/go-genproto/yandex/cloud/apploadbalancer/v1;apploadbalancerb\x06proto3"

var (
	file_yandex_cloud_apploadbalancer_v1_logging_proto_rawDescOnce sync.Once
	file_yandex_cloud_apploadbalancer_v1_logging_proto_rawDescData []byte
)

func file_yandex_cloud_apploadbalancer_v1_logging_proto_rawDescGZIP() []byte {
	file_yandex_cloud_apploadbalancer_v1_logging_proto_rawDescOnce.Do(func() {
		file_yandex_cloud_apploadbalancer_v1_logging_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_yandex_cloud_apploadbalancer_v1_logging_proto_rawDesc), len(file_yandex_cloud_apploadbalancer_v1_logging_proto_rawDesc)))
	})
	return file_yandex_cloud_apploadbalancer_v1_logging_proto_rawDescData
}

var file_yandex_cloud_apploadbalancer_v1_logging_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_yandex_cloud_apploadbalancer_v1_logging_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_yandex_cloud_apploadbalancer_v1_logging_proto_goTypes = []any{
	(HttpCodeInterval)(0),         // 0: yandex.cloud.apploadbalancer.v1.HttpCodeInterval
	(*LogDiscardRule)(nil),        // 1: yandex.cloud.apploadbalancer.v1.LogDiscardRule
	(*LogOptions)(nil),            // 2: yandex.cloud.apploadbalancer.v1.LogOptions
	(code.Code)(0),                // 3: google.rpc.Code
	(*wrapperspb.Int64Value)(nil), // 4: google.protobuf.Int64Value
}
var file_yandex_cloud_apploadbalancer_v1_logging_proto_depIdxs = []int32{
	0, // 0: yandex.cloud.apploadbalancer.v1.LogDiscardRule.http_code_intervals:type_name -> yandex.cloud.apploadbalancer.v1.HttpCodeInterval
	3, // 1: yandex.cloud.apploadbalancer.v1.LogDiscardRule.grpc_codes:type_name -> google.rpc.Code
	4, // 2: yandex.cloud.apploadbalancer.v1.LogDiscardRule.discard_percent:type_name -> google.protobuf.Int64Value
	1, // 3: yandex.cloud.apploadbalancer.v1.LogOptions.discard_rules:type_name -> yandex.cloud.apploadbalancer.v1.LogDiscardRule
	4, // [4:4] is the sub-list for method output_type
	4, // [4:4] 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_yandex_cloud_apploadbalancer_v1_logging_proto_init() }
func file_yandex_cloud_apploadbalancer_v1_logging_proto_init() {
	if File_yandex_cloud_apploadbalancer_v1_logging_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_yandex_cloud_apploadbalancer_v1_logging_proto_rawDesc), len(file_yandex_cloud_apploadbalancer_v1_logging_proto_rawDesc)),
			NumEnums:      1,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_yandex_cloud_apploadbalancer_v1_logging_proto_goTypes,
		DependencyIndexes: file_yandex_cloud_apploadbalancer_v1_logging_proto_depIdxs,
		EnumInfos:         file_yandex_cloud_apploadbalancer_v1_logging_proto_enumTypes,
		MessageInfos:      file_yandex_cloud_apploadbalancer_v1_logging_proto_msgTypes,
	}.Build()
	File_yandex_cloud_apploadbalancer_v1_logging_proto = out.File
	file_yandex_cloud_apploadbalancer_v1_logging_proto_goTypes = nil
	file_yandex_cloud_apploadbalancer_v1_logging_proto_depIdxs = nil
}
