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

package greenplum

import (
	_ "github.com/yandex-cloud/go-genproto/yandex/cloud"
	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)
)

type HBARule_ConnectionType int32

const (
	HBARule_CONNECTION_TYPE_UNSPECIFIED HBARule_ConnectionType = 0
	// Matches connection attempts made using TCP/IP.
	HBARule_HOST HBARule_ConnectionType = 1
	// Matches connection attempts made using TCP/IP, but only when the connection is made with SSL encryption.
	//
	// Deprecated: Marked as deprecated in yandex/cloud/mdb/greenplum/v1/hba_rule.proto.
	HBARule_HOSTSSL HBARule_ConnectionType = 2
	// Matches connection attempts made over TCP/IP that do not use SSL.
	//
	// Deprecated: Marked as deprecated in yandex/cloud/mdb/greenplum/v1/hba_rule.proto.
	HBARule_HOSTNOSSL HBARule_ConnectionType = 3
)

// Enum value maps for HBARule_ConnectionType.
var (
	HBARule_ConnectionType_name = map[int32]string{
		0: "CONNECTION_TYPE_UNSPECIFIED",
		1: "HOST",
		2: "HOSTSSL",
		3: "HOSTNOSSL",
	}
	HBARule_ConnectionType_value = map[string]int32{
		"CONNECTION_TYPE_UNSPECIFIED": 0,
		"HOST":                        1,
		"HOSTSSL":                     2,
		"HOSTNOSSL":                   3,
	}
)

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

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

func (HBARule_ConnectionType) Descriptor() protoreflect.EnumDescriptor {
	return file_yandex_cloud_mdb_greenplum_v1_hba_rule_proto_enumTypes[0].Descriptor()
}

func (HBARule_ConnectionType) Type() protoreflect.EnumType {
	return &file_yandex_cloud_mdb_greenplum_v1_hba_rule_proto_enumTypes[0]
}

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

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

type HBARule_AuthMethod int32

const (
	HBARule_AUTH_METHOD_UNSPECIFIED HBARule_AuthMethod = 0
	// Perform SCRAM-SHA-256 or MD5 authentication to verify the user's password.
	HBARule_MD5 HBARule_AuthMethod = 1
	// Perform LDAP authentication, if MDB_GREENPLUM_LDAP flag is set
	HBARule_LDAP HBARule_AuthMethod = 2
	// Disable authentication
	HBARule_REJECT HBARule_AuthMethod = 3
	// Perform authentication with IAM token
	HBARule_IAM HBARule_AuthMethod = 4
)

// Enum value maps for HBARule_AuthMethod.
var (
	HBARule_AuthMethod_name = map[int32]string{
		0: "AUTH_METHOD_UNSPECIFIED",
		1: "MD5",
		2: "LDAP",
		3: "REJECT",
		4: "IAM",
	}
	HBARule_AuthMethod_value = map[string]int32{
		"AUTH_METHOD_UNSPECIFIED": 0,
		"MD5":                     1,
		"LDAP":                    2,
		"REJECT":                  3,
		"IAM":                     4,
	}
)

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

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

func (HBARule_AuthMethod) Descriptor() protoreflect.EnumDescriptor {
	return file_yandex_cloud_mdb_greenplum_v1_hba_rule_proto_enumTypes[1].Descriptor()
}

func (HBARule_AuthMethod) Type() protoreflect.EnumType {
	return &file_yandex_cloud_mdb_greenplum_v1_hba_rule_proto_enumTypes[1]
}

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

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

type HBARule struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Priority of the Greenplum cluster rule.
	Priority       int64                  `protobuf:"varint,1,opt,name=priority,proto3" json:"priority,omitempty"`
	ConnectionType HBARule_ConnectionType `protobuf:"varint,2,opt,name=connection_type,json=connectionType,proto3,enum=yandex.cloud.mdb.greenplum.v1.HBARule_ConnectionType" json:"connection_type,omitempty"`
	// Specifies which database names this record matches.
	Database string `protobuf:"bytes,3,opt,name=database,proto3" json:"database,omitempty"`
	// Specifies which database role names this user matches.
	User string `protobuf:"bytes,4,opt,name=user,proto3" json:"user,omitempty"`
	// Specifies the client machine addresses that this record matches.
	Address string `protobuf:"bytes,5,opt,name=address,proto3" json:"address,omitempty"`
	// Specifies the authentication method to use when a connection matches this record.
	// https://gpdb.docs.pivotal.io/6-6/security-guide/topics/Authenticate.html
	AuthMethod    HBARule_AuthMethod `protobuf:"varint,6,opt,name=auth_method,json=authMethod,proto3,enum=yandex.cloud.mdb.greenplum.v1.HBARule_AuthMethod" json:"auth_method,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*HBARule) ProtoMessage() {}

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

func (x *HBARule) GetPriority() int64 {
	if x != nil {
		return x.Priority
	}
	return 0
}

func (x *HBARule) GetConnectionType() HBARule_ConnectionType {
	if x != nil {
		return x.ConnectionType
	}
	return HBARule_CONNECTION_TYPE_UNSPECIFIED
}

func (x *HBARule) GetDatabase() string {
	if x != nil {
		return x.Database
	}
	return ""
}

func (x *HBARule) GetUser() string {
	if x != nil {
		return x.User
	}
	return ""
}

func (x *HBARule) GetAddress() string {
	if x != nil {
		return x.Address
	}
	return ""
}

func (x *HBARule) GetAuthMethod() HBARule_AuthMethod {
	if x != nil {
		return x.AuthMethod
	}
	return HBARule_AUTH_METHOD_UNSPECIFIED
}

var File_yandex_cloud_mdb_greenplum_v1_hba_rule_proto protoreflect.FileDescriptor

const file_yandex_cloud_mdb_greenplum_v1_hba_rule_proto_rawDesc = "" +
	"\n" +
	",yandex/cloud/mdb/greenplum/v1/hba_rule.proto\x12\x1dyandex.cloud.mdb.greenplum.v1\x1a\x1dyandex/cloud/validation.proto\"\xf5\x03\n" +
	"\aHBARule\x12&\n" +
	"\bpriority\x18\x01 \x01(\x03B\n" +
	"\xfa\xc71\x060-1000R\bpriority\x12^\n" +
	"\x0fconnection_type\x18\x02 \x01(\x0e25.yandex.cloud.mdb.greenplum.v1.HBARule.ConnectionTypeR\x0econnectionType\x12 \n" +
	"\bdatabase\x18\x03 \x01(\tB\x04\xe8\xc71\x01R\bdatabase\x12\x18\n" +
	"\x04user\x18\x04 \x01(\tB\x04\xe8\xc71\x01R\x04user\x12\x1e\n" +
	"\aaddress\x18\x05 \x01(\tB\x04\xe8\xc71\x01R\aaddress\x12R\n" +
	"\vauth_method\x18\x06 \x01(\x0e21.yandex.cloud.mdb.greenplum.v1.HBARule.AuthMethodR\n" +
	"authMethod\"_\n" +
	"\x0eConnectionType\x12\x1f\n" +
	"\x1bCONNECTION_TYPE_UNSPECIFIED\x10\x00\x12\b\n" +
	"\x04HOST\x10\x01\x12\x0f\n" +
	"\aHOSTSSL\x10\x02\x1a\x02\b\x01\x12\x11\n" +
	"\tHOSTNOSSL\x10\x03\x1a\x02\b\x01\"Q\n" +
	"\n" +
	"AuthMethod\x12\x1b\n" +
	"\x17AUTH_METHOD_UNSPECIFIED\x10\x00\x12\a\n" +
	"\x03MD5\x10\x01\x12\b\n" +
	"\x04LDAP\x10\x02\x12\n" +
	"\n" +
	"\x06REJECT\x10\x03\x12\a\n" +
	"\x03IAM\x10\x04Bp\n" +
	"!yandex.cloud.api.mdb.greenplum.v1ZKgithub.com/yandex-cloud/go-genproto/yandex/cloud/mdb/greenplum/v1;greenplumb\x06proto3"

var (
	file_yandex_cloud_mdb_greenplum_v1_hba_rule_proto_rawDescOnce sync.Once
	file_yandex_cloud_mdb_greenplum_v1_hba_rule_proto_rawDescData []byte
)

func file_yandex_cloud_mdb_greenplum_v1_hba_rule_proto_rawDescGZIP() []byte {
	file_yandex_cloud_mdb_greenplum_v1_hba_rule_proto_rawDescOnce.Do(func() {
		file_yandex_cloud_mdb_greenplum_v1_hba_rule_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_yandex_cloud_mdb_greenplum_v1_hba_rule_proto_rawDesc), len(file_yandex_cloud_mdb_greenplum_v1_hba_rule_proto_rawDesc)))
	})
	return file_yandex_cloud_mdb_greenplum_v1_hba_rule_proto_rawDescData
}

var file_yandex_cloud_mdb_greenplum_v1_hba_rule_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_yandex_cloud_mdb_greenplum_v1_hba_rule_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_yandex_cloud_mdb_greenplum_v1_hba_rule_proto_goTypes = []any{
	(HBARule_ConnectionType)(0), // 0: yandex.cloud.mdb.greenplum.v1.HBARule.ConnectionType
	(HBARule_AuthMethod)(0),     // 1: yandex.cloud.mdb.greenplum.v1.HBARule.AuthMethod
	(*HBARule)(nil),             // 2: yandex.cloud.mdb.greenplum.v1.HBARule
}
var file_yandex_cloud_mdb_greenplum_v1_hba_rule_proto_depIdxs = []int32{
	0, // 0: yandex.cloud.mdb.greenplum.v1.HBARule.connection_type:type_name -> yandex.cloud.mdb.greenplum.v1.HBARule.ConnectionType
	1, // 1: yandex.cloud.mdb.greenplum.v1.HBARule.auth_method:type_name -> yandex.cloud.mdb.greenplum.v1.HBARule.AuthMethod
	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_yandex_cloud_mdb_greenplum_v1_hba_rule_proto_init() }
func file_yandex_cloud_mdb_greenplum_v1_hba_rule_proto_init() {
	if File_yandex_cloud_mdb_greenplum_v1_hba_rule_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_mdb_greenplum_v1_hba_rule_proto_rawDesc), len(file_yandex_cloud_mdb_greenplum_v1_hba_rule_proto_rawDesc)),
			NumEnums:      2,
			NumMessages:   1,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_yandex_cloud_mdb_greenplum_v1_hba_rule_proto_goTypes,
		DependencyIndexes: file_yandex_cloud_mdb_greenplum_v1_hba_rule_proto_depIdxs,
		EnumInfos:         file_yandex_cloud_mdb_greenplum_v1_hba_rule_proto_enumTypes,
		MessageInfos:      file_yandex_cloud_mdb_greenplum_v1_hba_rule_proto_msgTypes,
	}.Build()
	File_yandex_cloud_mdb_greenplum_v1_hba_rule_proto = out.File
	file_yandex_cloud_mdb_greenplum_v1_hba_rule_proto_goTypes = nil
	file_yandex_cloud_mdb_greenplum_v1_hba_rule_proto_depIdxs = nil
}
