// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.7
// 	protoc        v6.32.0
// source: service_config.proto

package gitalypb

import (
	reflect "reflect"
	sync "sync"
	unsafe "unsafe"

	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	durationpb "google.golang.org/protobuf/types/known/durationpb"
	wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
)

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 ServiceConfig struct {
	state               protoimpl.MessageState `protogen:"open.v1"`
	LoadBalancingConfig []*LoadBalancingConfig `protobuf:"bytes,1,rep,name=load_balancing_config,json=loadBalancingConfig,proto3" json:"load_balancing_config,omitempty"`
	MethodConfig        []*MethodConfig        `protobuf:"bytes,2,rep,name=method_config,json=methodConfig,proto3" json:"method_config,omitempty"`
	unknownFields       protoimpl.UnknownFields
	sizeCache           protoimpl.SizeCache
}

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

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

func (*ServiceConfig) ProtoMessage() {}

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

func (x *ServiceConfig) GetLoadBalancingConfig() []*LoadBalancingConfig {
	if x != nil {
		return x.LoadBalancingConfig
	}
	return nil
}

func (x *ServiceConfig) GetMethodConfig() []*MethodConfig {
	if x != nil {
		return x.MethodConfig
	}
	return nil
}

type LoadBalancingConfig struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Types that are valid to be assigned to Policy:
	//
	//	*LoadBalancingConfig_PickFirst
	//	*LoadBalancingConfig_RoundRobin
	Policy        isLoadBalancingConfig_Policy `protobuf_oneof:"policy"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*LoadBalancingConfig) ProtoMessage() {}

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

func (x *LoadBalancingConfig) GetPolicy() isLoadBalancingConfig_Policy {
	if x != nil {
		return x.Policy
	}
	return nil
}

func (x *LoadBalancingConfig) GetPickFirst() *PickFirstConfig {
	if x != nil {
		if x, ok := x.Policy.(*LoadBalancingConfig_PickFirst); ok {
			return x.PickFirst
		}
	}
	return nil
}

func (x *LoadBalancingConfig) GetRoundRobin() *RoundRobinConfig {
	if x != nil {
		if x, ok := x.Policy.(*LoadBalancingConfig_RoundRobin); ok {
			return x.RoundRobin
		}
	}
	return nil
}

type isLoadBalancingConfig_Policy interface {
	isLoadBalancingConfig_Policy()
}

type LoadBalancingConfig_PickFirst struct {
	PickFirst *PickFirstConfig `protobuf:"bytes,1,opt,name=pick_first,proto3,oneof"`
}

type LoadBalancingConfig_RoundRobin struct {
	RoundRobin *RoundRobinConfig `protobuf:"bytes,2,opt,name=round_robin,proto3,oneof"`
}

func (*LoadBalancingConfig_PickFirst) isLoadBalancingConfig_Policy() {}

func (*LoadBalancingConfig_RoundRobin) isLoadBalancingConfig_Policy() {}

type PickFirstConfig struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*PickFirstConfig) ProtoMessage() {}

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

type RoundRobinConfig struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *RoundRobinConfig) Reset() {
	*x = RoundRobinConfig{}
	mi := &file_service_config_proto_msgTypes[3]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*RoundRobinConfig) ProtoMessage() {}

func (x *RoundRobinConfig) ProtoReflect() protoreflect.Message {
	mi := &file_service_config_proto_msgTypes[3]
	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 RoundRobinConfig.ProtoReflect.Descriptor instead.
func (*RoundRobinConfig) Descriptor() ([]byte, []int) {
	return file_service_config_proto_rawDescGZIP(), []int{3}
}

type MethodConfig struct {
	state                   protoimpl.MessageState    `protogen:"open.v1"`
	Name                    []*MethodConfig_Name      `protobuf:"bytes,1,rep,name=name,proto3" json:"name,omitempty"`
	WaitForReady            *wrapperspb.BoolValue     `protobuf:"bytes,2,opt,name=wait_for_ready,json=waitForReady,proto3" json:"wait_for_ready,omitempty"`
	Timeout                 *durationpb.Duration      `protobuf:"bytes,3,opt,name=timeout,proto3" json:"timeout,omitempty"`
	MaxRequestMessageBytes  *wrapperspb.UInt32Value   `protobuf:"bytes,4,opt,name=max_request_message_bytes,json=maxRequestMessageBytes,proto3" json:"max_request_message_bytes,omitempty"`
	MaxResponseMessageBytes *wrapperspb.UInt32Value   `protobuf:"bytes,5,opt,name=max_response_message_bytes,json=maxResponseMessageBytes,proto3" json:"max_response_message_bytes,omitempty"`
	RetryPolicy             *MethodConfig_RetryPolicy `protobuf:"bytes,6,opt,name=retry_policy,json=retryPolicy,proto3" json:"retry_policy,omitempty"`
	unknownFields           protoimpl.UnknownFields
	sizeCache               protoimpl.SizeCache
}

func (x *MethodConfig) Reset() {
	*x = MethodConfig{}
	mi := &file_service_config_proto_msgTypes[4]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*MethodConfig) ProtoMessage() {}

func (x *MethodConfig) ProtoReflect() protoreflect.Message {
	mi := &file_service_config_proto_msgTypes[4]
	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 MethodConfig.ProtoReflect.Descriptor instead.
func (*MethodConfig) Descriptor() ([]byte, []int) {
	return file_service_config_proto_rawDescGZIP(), []int{4}
}

func (x *MethodConfig) GetName() []*MethodConfig_Name {
	if x != nil {
		return x.Name
	}
	return nil
}

func (x *MethodConfig) GetWaitForReady() *wrapperspb.BoolValue {
	if x != nil {
		return x.WaitForReady
	}
	return nil
}

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

func (x *MethodConfig) GetMaxRequestMessageBytes() *wrapperspb.UInt32Value {
	if x != nil {
		return x.MaxRequestMessageBytes
	}
	return nil
}

func (x *MethodConfig) GetMaxResponseMessageBytes() *wrapperspb.UInt32Value {
	if x != nil {
		return x.MaxResponseMessageBytes
	}
	return nil
}

func (x *MethodConfig) GetRetryPolicy() *MethodConfig_RetryPolicy {
	if x != nil {
		return x.RetryPolicy
	}
	return nil
}

type MethodConfig_Name struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Service       string                 `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
	Method        string                 `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *MethodConfig_Name) Reset() {
	*x = MethodConfig_Name{}
	mi := &file_service_config_proto_msgTypes[5]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*MethodConfig_Name) ProtoMessage() {}

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

func (x *MethodConfig_Name) GetService() string {
	if x != nil {
		return x.Service
	}
	return ""
}

func (x *MethodConfig_Name) GetMethod() string {
	if x != nil {
		return x.Method
	}
	return ""
}

type MethodConfig_RetryPolicy struct {
	state                protoimpl.MessageState `protogen:"open.v1"`
	MaxAttempts          uint32                 `protobuf:"varint,1,opt,name=max_attempts,json=maxAttempts,proto3" json:"max_attempts,omitempty"`
	InitialBackoff       *durationpb.Duration   `protobuf:"bytes,2,opt,name=initial_backoff,json=initialBackoff,proto3" json:"initial_backoff,omitempty"`
	MaxBackoff           *durationpb.Duration   `protobuf:"bytes,3,opt,name=max_backoff,json=maxBackoff,proto3" json:"max_backoff,omitempty"`
	BackoffMultiplier    float32                `protobuf:"fixed32,4,opt,name=backoff_multiplier,json=backoffMultiplier,proto3" json:"backoff_multiplier,omitempty"`
	RetryableStatusCodes []string               `protobuf:"bytes,5,rep,name=retryable_status_codes,json=retryableStatusCodes,proto3" json:"retryable_status_codes,omitempty"`
	unknownFields        protoimpl.UnknownFields
	sizeCache            protoimpl.SizeCache
}

func (x *MethodConfig_RetryPolicy) Reset() {
	*x = MethodConfig_RetryPolicy{}
	mi := &file_service_config_proto_msgTypes[6]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*MethodConfig_RetryPolicy) ProtoMessage() {}

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

func (x *MethodConfig_RetryPolicy) GetMaxAttempts() uint32 {
	if x != nil {
		return x.MaxAttempts
	}
	return 0
}

func (x *MethodConfig_RetryPolicy) GetInitialBackoff() *durationpb.Duration {
	if x != nil {
		return x.InitialBackoff
	}
	return nil
}

func (x *MethodConfig_RetryPolicy) GetMaxBackoff() *durationpb.Duration {
	if x != nil {
		return x.MaxBackoff
	}
	return nil
}

func (x *MethodConfig_RetryPolicy) GetBackoffMultiplier() float32 {
	if x != nil {
		return x.BackoffMultiplier
	}
	return 0
}

func (x *MethodConfig_RetryPolicy) GetRetryableStatusCodes() []string {
	if x != nil {
		return x.RetryableStatusCodes
	}
	return nil
}

var File_service_config_proto protoreflect.FileDescriptor

const file_service_config_proto_rawDesc = "" +
	"\n" +
	"\x14service_config.proto\x12\x06gitaly\x1a\x1egoogle/protobuf/duration.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\x9b\x01\n" +
	"\rServiceConfig\x12O\n" +
	"\x15load_balancing_config\x18\x01 \x03(\v2\x1b.gitaly.LoadBalancingConfigR\x13loadBalancingConfig\x129\n" +
	"\rmethod_config\x18\x02 \x03(\v2\x14.gitaly.MethodConfigR\fmethodConfig\"\x98\x01\n" +
	"\x13LoadBalancingConfig\x129\n" +
	"\n" +
	"pick_first\x18\x01 \x01(\v2\x17.gitaly.PickFirstConfigH\x00R\n" +
	"pick_first\x12<\n" +
	"\vround_robin\x18\x02 \x01(\v2\x18.gitaly.RoundRobinConfigH\x00R\vround_robinB\b\n" +
	"\x06policy\"\x11\n" +
	"\x0fPickFirstConfig\"\x12\n" +
	"\x10RoundRobinConfig\"\xff\x05\n" +
	"\fMethodConfig\x12-\n" +
	"\x04name\x18\x01 \x03(\v2\x19.gitaly.MethodConfig.NameR\x04name\x12@\n" +
	"\x0ewait_for_ready\x18\x02 \x01(\v2\x1a.google.protobuf.BoolValueR\fwaitForReady\x123\n" +
	"\atimeout\x18\x03 \x01(\v2\x19.google.protobuf.DurationR\atimeout\x12W\n" +
	"\x19max_request_message_bytes\x18\x04 \x01(\v2\x1c.google.protobuf.UInt32ValueR\x16maxRequestMessageBytes\x12Y\n" +
	"\x1amax_response_message_bytes\x18\x05 \x01(\v2\x1c.google.protobuf.UInt32ValueR\x17maxResponseMessageBytes\x12C\n" +
	"\fretry_policy\x18\x06 \x01(\v2 .gitaly.MethodConfig.RetryPolicyR\vretryPolicy\x1a8\n" +
	"\x04Name\x12\x18\n" +
	"\aservice\x18\x01 \x01(\tR\aservice\x12\x16\n" +
	"\x06method\x18\x02 \x01(\tR\x06method\x1a\x95\x02\n" +
	"\vRetryPolicy\x12!\n" +
	"\fmax_attempts\x18\x01 \x01(\rR\vmaxAttempts\x12B\n" +
	"\x0finitial_backoff\x18\x02 \x01(\v2\x19.google.protobuf.DurationR\x0einitialBackoff\x12:\n" +
	"\vmax_backoff\x18\x03 \x01(\v2\x19.google.protobuf.DurationR\n" +
	"maxBackoff\x12-\n" +
	"\x12backoff_multiplier\x18\x04 \x01(\x02R\x11backoffMultiplier\x124\n" +
	"\x16retryable_status_codes\x18\x05 \x03(\tR\x14retryableStatusCodesB^Z\\gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v18/internal/gitaly/vendored/gitalypbb\x06proto3"

var (
	file_service_config_proto_rawDescOnce sync.Once
	file_service_config_proto_rawDescData []byte
)

func file_service_config_proto_rawDescGZIP() []byte {
	file_service_config_proto_rawDescOnce.Do(func() {
		file_service_config_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_service_config_proto_rawDesc), len(file_service_config_proto_rawDesc)))
	})
	return file_service_config_proto_rawDescData
}

var file_service_config_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_service_config_proto_goTypes = []any{
	(*ServiceConfig)(nil),            // 0: gitaly.ServiceConfig
	(*LoadBalancingConfig)(nil),      // 1: gitaly.LoadBalancingConfig
	(*PickFirstConfig)(nil),          // 2: gitaly.PickFirstConfig
	(*RoundRobinConfig)(nil),         // 3: gitaly.RoundRobinConfig
	(*MethodConfig)(nil),             // 4: gitaly.MethodConfig
	(*MethodConfig_Name)(nil),        // 5: gitaly.MethodConfig.Name
	(*MethodConfig_RetryPolicy)(nil), // 6: gitaly.MethodConfig.RetryPolicy
	(*wrapperspb.BoolValue)(nil),     // 7: google.protobuf.BoolValue
	(*durationpb.Duration)(nil),      // 8: google.protobuf.Duration
	(*wrapperspb.UInt32Value)(nil),   // 9: google.protobuf.UInt32Value
}
var file_service_config_proto_depIdxs = []int32{
	1,  // 0: gitaly.ServiceConfig.load_balancing_config:type_name -> gitaly.LoadBalancingConfig
	4,  // 1: gitaly.ServiceConfig.method_config:type_name -> gitaly.MethodConfig
	2,  // 2: gitaly.LoadBalancingConfig.pick_first:type_name -> gitaly.PickFirstConfig
	3,  // 3: gitaly.LoadBalancingConfig.round_robin:type_name -> gitaly.RoundRobinConfig
	5,  // 4: gitaly.MethodConfig.name:type_name -> gitaly.MethodConfig.Name
	7,  // 5: gitaly.MethodConfig.wait_for_ready:type_name -> google.protobuf.BoolValue
	8,  // 6: gitaly.MethodConfig.timeout:type_name -> google.protobuf.Duration
	9,  // 7: gitaly.MethodConfig.max_request_message_bytes:type_name -> google.protobuf.UInt32Value
	9,  // 8: gitaly.MethodConfig.max_response_message_bytes:type_name -> google.protobuf.UInt32Value
	6,  // 9: gitaly.MethodConfig.retry_policy:type_name -> gitaly.MethodConfig.RetryPolicy
	8,  // 10: gitaly.MethodConfig.RetryPolicy.initial_backoff:type_name -> google.protobuf.Duration
	8,  // 11: gitaly.MethodConfig.RetryPolicy.max_backoff:type_name -> google.protobuf.Duration
	12, // [12:12] is the sub-list for method output_type
	12, // [12:12] is the sub-list for method input_type
	12, // [12:12] is the sub-list for extension type_name
	12, // [12:12] is the sub-list for extension extendee
	0,  // [0:12] is the sub-list for field type_name
}

func init() { file_service_config_proto_init() }
func file_service_config_proto_init() {
	if File_service_config_proto != nil {
		return
	}
	file_service_config_proto_msgTypes[1].OneofWrappers = []any{
		(*LoadBalancingConfig_PickFirst)(nil),
		(*LoadBalancingConfig_RoundRobin)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_service_config_proto_rawDesc), len(file_service_config_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   7,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_service_config_proto_goTypes,
		DependencyIndexes: file_service_config_proto_depIdxs,
		MessageInfos:      file_service_config_proto_msgTypes,
	}.Build()
	File_service_config_proto = out.File
	file_service_config_proto_goTypes = nil
	file_service_config_proto_depIdxs = nil
}
