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

package vpc // import "github.com/yandex-cloud/go-genproto/yandex/cloud/vpc/v1"

import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import timestamp "github.com/golang/protobuf/ptypes/timestamp"

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package

// A RouteTable resource. For more information, see [RouteTables](/docs/vpc/concepts/route_tables).
type RouteTable struct {
	// 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 *timestamp.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// Name of the route table. The name is unique within the project. 3-63 characters long.
	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 as `` key:value `` pairs. Мaximum of 64 per resource.
	Labels map[string]string `protobuf:"bytes,6,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
	// 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"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

func (m *RouteTable) Reset()         { *m = RouteTable{} }
func (m *RouteTable) String() string { return proto.CompactTextString(m) }
func (*RouteTable) ProtoMessage()    {}
func (*RouteTable) Descriptor() ([]byte, []int) {
	return fileDescriptor_route_table_5b58e1ab44cd12e3, []int{0}
}
func (m *RouteTable) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_RouteTable.Unmarshal(m, b)
}
func (m *RouteTable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_RouteTable.Marshal(b, m, deterministic)
}
func (dst *RouteTable) XXX_Merge(src proto.Message) {
	xxx_messageInfo_RouteTable.Merge(dst, src)
}
func (m *RouteTable) XXX_Size() int {
	return xxx_messageInfo_RouteTable.Size(m)
}
func (m *RouteTable) XXX_DiscardUnknown() {
	xxx_messageInfo_RouteTable.DiscardUnknown(m)
}

var xxx_messageInfo_RouteTable proto.InternalMessageInfo

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

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

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

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

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

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

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

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

// A StaticRoute resource. For more information, see [StaticRoutes](/docs/vpc/concepts/static_routes).
type StaticRoute struct {
	// 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
	NextHop              isStaticRoute_NextHop `protobuf_oneof:"next_hop"`
	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
	XXX_unrecognized     []byte                `json:"-"`
	XXX_sizecache        int32                 `json:"-"`
}

func (m *StaticRoute) Reset()         { *m = StaticRoute{} }
func (m *StaticRoute) String() string { return proto.CompactTextString(m) }
func (*StaticRoute) ProtoMessage()    {}
func (*StaticRoute) Descriptor() ([]byte, []int) {
	return fileDescriptor_route_table_5b58e1ab44cd12e3, []int{1}
}
func (m *StaticRoute) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_StaticRoute.Unmarshal(m, b)
}
func (m *StaticRoute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_StaticRoute.Marshal(b, m, deterministic)
}
func (dst *StaticRoute) XXX_Merge(src proto.Message) {
	xxx_messageInfo_StaticRoute.Merge(dst, src)
}
func (m *StaticRoute) XXX_Size() int {
	return xxx_messageInfo_StaticRoute.Size(m)
}
func (m *StaticRoute) XXX_DiscardUnknown() {
	xxx_messageInfo_StaticRoute.DiscardUnknown(m)
}

var xxx_messageInfo_StaticRoute proto.InternalMessageInfo

type isStaticRoute_Destination interface {
	isStaticRoute_Destination()
}

type StaticRoute_DestinationPrefix struct {
	DestinationPrefix string `protobuf:"bytes,1,opt,name=destination_prefix,json=destinationPrefix,proto3,oneof"`
}

func (*StaticRoute_DestinationPrefix) isStaticRoute_Destination() {}

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

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

type isStaticRoute_NextHop interface {
	isStaticRoute_NextHop()
}

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

func (*StaticRoute_NextHopAddress) isStaticRoute_NextHop() {}

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

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

// XXX_OneofFuncs is for the internal use of the proto package.
func (*StaticRoute) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
	return _StaticRoute_OneofMarshaler, _StaticRoute_OneofUnmarshaler, _StaticRoute_OneofSizer, []interface{}{
		(*StaticRoute_DestinationPrefix)(nil),
		(*StaticRoute_NextHopAddress)(nil),
	}
}

func _StaticRoute_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
	m := msg.(*StaticRoute)
	// destination
	switch x := m.Destination.(type) {
	case *StaticRoute_DestinationPrefix:
		b.EncodeVarint(1<<3 | proto.WireBytes)
		b.EncodeStringBytes(x.DestinationPrefix)
	case nil:
	default:
		return fmt.Errorf("StaticRoute.Destination has unexpected type %T", x)
	}
	// next_hop
	switch x := m.NextHop.(type) {
	case *StaticRoute_NextHopAddress:
		b.EncodeVarint(2<<3 | proto.WireBytes)
		b.EncodeStringBytes(x.NextHopAddress)
	case nil:
	default:
		return fmt.Errorf("StaticRoute.NextHop has unexpected type %T", x)
	}
	return nil
}

func _StaticRoute_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
	m := msg.(*StaticRoute)
	switch tag {
	case 1: // destination.destination_prefix
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		x, err := b.DecodeStringBytes()
		m.Destination = &StaticRoute_DestinationPrefix{x}
		return true, err
	case 2: // next_hop.next_hop_address
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		x, err := b.DecodeStringBytes()
		m.NextHop = &StaticRoute_NextHopAddress{x}
		return true, err
	default:
		return false, nil
	}
}

func _StaticRoute_OneofSizer(msg proto.Message) (n int) {
	m := msg.(*StaticRoute)
	// destination
	switch x := m.Destination.(type) {
	case *StaticRoute_DestinationPrefix:
		n += 1 // tag and wire
		n += proto.SizeVarint(uint64(len(x.DestinationPrefix)))
		n += len(x.DestinationPrefix)
	case nil:
	default:
		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
	}
	// next_hop
	switch x := m.NextHop.(type) {
	case *StaticRoute_NextHopAddress:
		n += 1 // tag and wire
		n += proto.SizeVarint(uint64(len(x.NextHopAddress)))
		n += len(x.NextHopAddress)
	case nil:
	default:
		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
	}
	return n
}

func init() {
	proto.RegisterType((*RouteTable)(nil), "yandex.cloud.vpc.v1.RouteTable")
	proto.RegisterMapType((map[string]string)(nil), "yandex.cloud.vpc.v1.RouteTable.LabelsEntry")
	proto.RegisterType((*StaticRoute)(nil), "yandex.cloud.vpc.v1.StaticRoute")
}

func init() {
	proto.RegisterFile("yandex/cloud/vpc/v1/route_table.proto", fileDescriptor_route_table_5b58e1ab44cd12e3)
}

var fileDescriptor_route_table_5b58e1ab44cd12e3 = []byte{
	// 436 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x52, 0x41, 0x6b, 0xdb, 0x30,
	0x18, 0x9d, 0x93, 0x36, 0x4b, 0x3e, 0xaf, 0xa5, 0xd3, 0x76, 0x30, 0x19, 0x63, 0xa6, 0x30, 0x08,
	0x1b, 0x95, 0x69, 0x77, 0x59, 0x57, 0x76, 0x68, 0x46, 0x21, 0x85, 0x1d, 0x86, 0xd7, 0xd3, 0x2e,
	0x46, 0xb6, 0xbe, 0xb8, 0xa2, 0x8e, 0x25, 0x24, 0xd9, 0x4b, 0x7e, 0xc0, 0xee, 0xfb, 0xc9, 0xc5,
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