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

package spqr

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 Shard struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Name of the shard.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// ID of the cluster that the shard belongs to.
	ClusterId     string `protobuf:"bytes,2,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*Shard) ProtoMessage() {}

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

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

func (x *Shard) GetClusterId() string {
	if x != nil {
		return x.ClusterId
	}
	return ""
}

type ShardSpec struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Name of the SPQR shard to create.
	ShardName string `protobuf:"bytes,1,opt,name=shard_name,json=shardName,proto3" json:"shard_name,omitempty"`
	// Types that are valid to be assigned to Spec:
	//
	//	*ShardSpec_MdbPostgresql
	Spec          isShardSpec_Spec `protobuf_oneof:"Spec"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ShardSpec) ProtoMessage() {}

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

func (x *ShardSpec) GetShardName() string {
	if x != nil {
		return x.ShardName
	}
	return ""
}

func (x *ShardSpec) GetSpec() isShardSpec_Spec {
	if x != nil {
		return x.Spec
	}
	return nil
}

func (x *ShardSpec) GetMdbPostgresql() *MDBPostgreSQL {
	if x != nil {
		if x, ok := x.Spec.(*ShardSpec_MdbPostgresql); ok {
			return x.MdbPostgresql
		}
	}
	return nil
}

type isShardSpec_Spec interface {
	isShardSpec_Spec()
}

type ShardSpec_MdbPostgresql struct {
	// Properties of the MDB PostgreSQL cluster
	MdbPostgresql *MDBPostgreSQL `protobuf:"bytes,2,opt,name=mdb_postgresql,json=mdbPostgresql,proto3,oneof"`
}

func (*ShardSpec_MdbPostgresql) isShardSpec_Spec() {}

var File_yandex_cloud_mdb_spqr_v1_shard_proto protoreflect.FileDescriptor

const file_yandex_cloud_mdb_spqr_v1_shard_proto_rawDesc = "" +
	"\n" +
	"$yandex/cloud/mdb/spqr/v1/shard.proto\x12\x18yandex.cloud.mdb.spqr.v1\x1a\x1dyandex/cloud/validation.proto\x1a%yandex/cloud/mdb/spqr/v1/config.proto\":\n" +
	"\x05Shard\x12\x12\n" +
	"\x04name\x18\x01 \x01(\tR\x04name\x12\x1d\n" +
	"\n" +
	"cluster_id\x18\x02 \x01(\tR\tclusterId\"\xb6\x01\n" +
	"\tShardSpec\x12I\n" +
	"\n" +
	"shard_name\x18\x01 \x01(\tB*\xe8\xc71\x01\xf2\xc71\x1a^[a-zA-Z0-9][a-zA-Z0-9-]*$\x8a\xc81\x04<=63R\tshardName\x12P\n" +
	"\x0emdb_postgresql\x18\x02 \x01(\v2'.yandex.cloud.mdb.spqr.v1.MDBPostgreSQLH\x00R\rmdbPostgresqlB\f\n" +
	"\x04Spec\x12\x04\xc0\xc11\x01Ba\n" +
	"\x1cyandex.cloud.api.mdb.spqr.v1ZAgithub.com/yandex-cloud/go-genproto/yandex/cloud/mdb/spqr/v1;spqrb\x06proto3"

var (
	file_yandex_cloud_mdb_spqr_v1_shard_proto_rawDescOnce sync.Once
	file_yandex_cloud_mdb_spqr_v1_shard_proto_rawDescData []byte
)

func file_yandex_cloud_mdb_spqr_v1_shard_proto_rawDescGZIP() []byte {
	file_yandex_cloud_mdb_spqr_v1_shard_proto_rawDescOnce.Do(func() {
		file_yandex_cloud_mdb_spqr_v1_shard_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_yandex_cloud_mdb_spqr_v1_shard_proto_rawDesc), len(file_yandex_cloud_mdb_spqr_v1_shard_proto_rawDesc)))
	})
	return file_yandex_cloud_mdb_spqr_v1_shard_proto_rawDescData
}

var file_yandex_cloud_mdb_spqr_v1_shard_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_yandex_cloud_mdb_spqr_v1_shard_proto_goTypes = []any{
	(*Shard)(nil),         // 0: yandex.cloud.mdb.spqr.v1.Shard
	(*ShardSpec)(nil),     // 1: yandex.cloud.mdb.spqr.v1.ShardSpec
	(*MDBPostgreSQL)(nil), // 2: yandex.cloud.mdb.spqr.v1.MDBPostgreSQL
}
var file_yandex_cloud_mdb_spqr_v1_shard_proto_depIdxs = []int32{
	2, // 0: yandex.cloud.mdb.spqr.v1.ShardSpec.mdb_postgresql:type_name -> yandex.cloud.mdb.spqr.v1.MDBPostgreSQL
	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_yandex_cloud_mdb_spqr_v1_shard_proto_init() }
func file_yandex_cloud_mdb_spqr_v1_shard_proto_init() {
	if File_yandex_cloud_mdb_spqr_v1_shard_proto != nil {
		return
	}
	file_yandex_cloud_mdb_spqr_v1_config_proto_init()
	file_yandex_cloud_mdb_spqr_v1_shard_proto_msgTypes[1].OneofWrappers = []any{
		(*ShardSpec_MdbPostgresql)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_yandex_cloud_mdb_spqr_v1_shard_proto_rawDesc), len(file_yandex_cloud_mdb_spqr_v1_shard_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_yandex_cloud_mdb_spqr_v1_shard_proto_goTypes,
		DependencyIndexes: file_yandex_cloud_mdb_spqr_v1_shard_proto_depIdxs,
		MessageInfos:      file_yandex_cloud_mdb_spqr_v1_shard_proto_msgTypes,
	}.Build()
	File_yandex_cloud_mdb_spqr_v1_shard_proto = out.File
	file_yandex_cloud_mdb_spqr_v1_shard_proto_goTypes = nil
	file_yandex_cloud_mdb_spqr_v1_shard_proto_depIdxs = nil
}
