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

package vpc

import (
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	timestamppb "google.golang.org/protobuf/types/known/timestamppb"
	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)
)

// A RouteTable resource. For more information, see [Static Routes](/docs/vpc/concepts/routing).
type RouteTable struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// ID of the route table.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// ID of the folder that the route table belongs to.
	FolderId string `protobuf:"bytes,2,opt,name=folder_id,json=folderId,proto3" json:"folder_id,omitempty"`
	// Creation timestamp in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// Name of the route table.
	// The name must be unique within the folder.
	// Value must match the regular expression `|[a-zA-Z]([-_a-zA-Z0-9]{0,61}[a-zA-Z0-9])?`.
	Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
	// Optional description of the route table. 0-256 characters long.
	Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
	// Resource labels, `key:value` pairs.
	// No more than 64 per resource.
	// The string length in characters for each key must be 1-63.
	// Each value must match the regular expression `[-_0-9a-z]*`.
	// Each key must match the regular expression `[a-z][-_0-9a-z]*`.
	Labels map[string]string `protobuf:"bytes,6,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
	// ID of the network the route table belongs to.
	NetworkId string `protobuf:"bytes,7,opt,name=network_id,json=networkId,proto3" json:"network_id,omitempty"`
	// List of static routes.
	StaticRoutes  []*StaticRoute `protobuf:"bytes,8,rep,name=static_routes,json=staticRoutes,proto3" json:"static_routes,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*RouteTable) ProtoMessage() {}

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

func (x *RouteTable) GetId() string {
	if x != nil {
		return x.Id
	}
	return ""
}

func (x *RouteTable) GetFolderId() string {
	if x != nil {
		return x.FolderId
	}
	return ""
}

func (x *RouteTable) GetCreatedAt() *timestamppb.Timestamp {
	if x != nil {
		return x.CreatedAt
	}
	return nil
}

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

func (x *RouteTable) GetDescription() string {
	if x != nil {
		return x.Description
	}
	return ""
}

func (x *RouteTable) GetLabels() map[string]string {
	if x != nil {
		return x.Labels
	}
	return nil
}

func (x *RouteTable) GetNetworkId() string {
	if x != nil {
		return x.NetworkId
	}
	return ""
}

func (x *RouteTable) GetStaticRoutes() []*StaticRoute {
	if x != nil {
		return x.StaticRoutes
	}
	return nil
}

// A StaticRoute resource. For more information, see [Static Routes](/docs/vpc/concepts/routing).
type StaticRoute struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Types that are valid to be assigned to Destination:
	//
	//	*StaticRoute_DestinationPrefix
	Destination isStaticRoute_Destination `protobuf_oneof:"destination"`
	// Types that are valid to be assigned to NextHop:
	//
	//	*StaticRoute_NextHopAddress
	//	*StaticRoute_GatewayId
	NextHop isStaticRoute_NextHop `protobuf_oneof:"next_hop"`
	// Resource labels as “ key:value “ pairs. Maximum of 64 per resource.
	Labels        map[string]string `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*StaticRoute) ProtoMessage() {}

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

func (x *StaticRoute) GetDestination() isStaticRoute_Destination {
	if x != nil {
		return x.Destination
	}
	return nil
}

func (x *StaticRoute) GetDestinationPrefix() string {
	if x != nil {
		if x, ok := x.Destination.(*StaticRoute_DestinationPrefix); ok {
			return x.DestinationPrefix
		}
	}
	return ""
}

func (x *StaticRoute) GetNextHop() isStaticRoute_NextHop {
	if x != nil {
		return x.NextHop
	}
	return nil
}

func (x *StaticRoute) GetNextHopAddress() string {
	if x != nil {
		if x, ok := x.NextHop.(*StaticRoute_NextHopAddress); ok {
			return x.NextHopAddress
		}
	}
	return ""
}

func (x *StaticRoute) GetGatewayId() string {
	if x != nil {
		if x, ok := x.NextHop.(*StaticRoute_GatewayId); ok {
			return x.GatewayId
		}
	}
	return ""
}

func (x *StaticRoute) GetLabels() map[string]string {
	if x != nil {
		return x.Labels
	}
	return nil
}

type isStaticRoute_Destination interface {
	isStaticRoute_Destination()
}

type StaticRoute_DestinationPrefix struct {
	// Destination subnet in CIDR notation
	DestinationPrefix string `protobuf:"bytes,1,opt,name=destination_prefix,json=destinationPrefix,proto3,oneof"`
}

func (*StaticRoute_DestinationPrefix) isStaticRoute_Destination() {}

type isStaticRoute_NextHop interface {
	isStaticRoute_NextHop()
}

type StaticRoute_NextHopAddress struct {
	// Next hop IP address
	NextHopAddress string `protobuf:"bytes,2,opt,name=next_hop_address,json=nextHopAddress,proto3,oneof"`
}

type StaticRoute_GatewayId struct {
	// Next hop gateway id
	GatewayId string `protobuf:"bytes,4,opt,name=gateway_id,json=gatewayId,proto3,oneof"`
}

func (*StaticRoute_NextHopAddress) isStaticRoute_NextHop() {}

func (*StaticRoute_GatewayId) isStaticRoute_NextHop() {}

var File_yandex_cloud_vpc_v1_route_table_proto protoreflect.FileDescriptor

const file_yandex_cloud_vpc_v1_route_table_proto_rawDesc = "" +
	"\n" +
	"%yandex/cloud/vpc/v1/route_table.proto\x12\x13yandex.cloud.vpc.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\x90\x03\n" +
	"\n" +
	"RouteTable\x12\x0e\n" +
	"\x02id\x18\x01 \x01(\tR\x02id\x12\x1b\n" +
	"\tfolder_id\x18\x02 \x01(\tR\bfolderId\x129\n" +
	"\n" +
	"created_at\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x12\n" +
	"\x04name\x18\x04 \x01(\tR\x04name\x12 \n" +
	"\vdescription\x18\x05 \x01(\tR\vdescription\x12C\n" +
	"\x06labels\x18\x06 \x03(\v2+.yandex.cloud.vpc.v1.RouteTable.LabelsEntryR\x06labels\x12\x1d\n" +
	"\n" +
	"network_id\x18\a \x01(\tR\tnetworkId\x12E\n" +
	"\rstatic_routes\x18\b \x03(\v2 .yandex.cloud.vpc.v1.StaticRouteR\fstaticRoutes\x1a9\n" +
	"\vLabelsEntry\x12\x10\n" +
	"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
	"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xa7\x02\n" +
	"\vStaticRoute\x12/\n" +
	"\x12destination_prefix\x18\x01 \x01(\tH\x00R\x11destinationPrefix\x12*\n" +
	"\x10next_hop_address\x18\x02 \x01(\tH\x01R\x0enextHopAddress\x12\x1f\n" +
	"\n" +
	"gateway_id\x18\x04 \x01(\tH\x01R\tgatewayId\x12D\n" +
	"\x06labels\x18\x03 \x03(\v2,.yandex.cloud.vpc.v1.StaticRoute.LabelsEntryR\x06labels\x1a9\n" +
	"\vLabelsEntry\x12\x10\n" +
	"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
	"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01B\r\n" +
	"\vdestinationB\n" +
	"\n" +
	"\bnext_hopBV\n" +
	"\x17yandex.cloud.api.vpc.v1Z;github.com/yandex-cloud/go-genproto/yandex/cloud/vpc/v1;vpcb\x06proto3"

var (
	file_yandex_cloud_vpc_v1_route_table_proto_rawDescOnce sync.Once
	file_yandex_cloud_vpc_v1_route_table_proto_rawDescData []byte
)

func file_yandex_cloud_vpc_v1_route_table_proto_rawDescGZIP() []byte {
	file_yandex_cloud_vpc_v1_route_table_proto_rawDescOnce.Do(func() {
		file_yandex_cloud_vpc_v1_route_table_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_yandex_cloud_vpc_v1_route_table_proto_rawDesc), len(file_yandex_cloud_vpc_v1_route_table_proto_rawDesc)))
	})
	return file_yandex_cloud_vpc_v1_route_table_proto_rawDescData
}

var file_yandex_cloud_vpc_v1_route_table_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_yandex_cloud_vpc_v1_route_table_proto_goTypes = []any{
	(*RouteTable)(nil),            // 0: yandex.cloud.vpc.v1.RouteTable
	(*StaticRoute)(nil),           // 1: yandex.cloud.vpc.v1.StaticRoute
	nil,                           // 2: yandex.cloud.vpc.v1.RouteTable.LabelsEntry
	nil,                           // 3: yandex.cloud.vpc.v1.StaticRoute.LabelsEntry
	(*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp
}
var file_yandex_cloud_vpc_v1_route_table_proto_depIdxs = []int32{
	4, // 0: yandex.cloud.vpc.v1.RouteTable.created_at:type_name -> google.protobuf.Timestamp
	2, // 1: yandex.cloud.vpc.v1.RouteTable.labels:type_name -> yandex.cloud.vpc.v1.RouteTable.LabelsEntry
	1, // 2: yandex.cloud.vpc.v1.RouteTable.static_routes:type_name -> yandex.cloud.vpc.v1.StaticRoute
	3, // 3: yandex.cloud.vpc.v1.StaticRoute.labels:type_name -> yandex.cloud.vpc.v1.StaticRoute.LabelsEntry
	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_vpc_v1_route_table_proto_init() }
func file_yandex_cloud_vpc_v1_route_table_proto_init() {
	if File_yandex_cloud_vpc_v1_route_table_proto != nil {
		return
	}
	file_yandex_cloud_vpc_v1_route_table_proto_msgTypes[1].OneofWrappers = []any{
		(*StaticRoute_DestinationPrefix)(nil),
		(*StaticRoute_NextHopAddress)(nil),
		(*StaticRoute_GatewayId)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_yandex_cloud_vpc_v1_route_table_proto_rawDesc), len(file_yandex_cloud_vpc_v1_route_table_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   4,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_yandex_cloud_vpc_v1_route_table_proto_goTypes,
		DependencyIndexes: file_yandex_cloud_vpc_v1_route_table_proto_depIdxs,
		MessageInfos:      file_yandex_cloud_vpc_v1_route_table_proto_msgTypes,
	}.Build()
	File_yandex_cloud_vpc_v1_route_table_proto = out.File
	file_yandex_cloud_vpc_v1_route_table_proto_goTypes = nil
	file_yandex_cloud_vpc_v1_route_table_proto_depIdxs = nil
}
