//
// Copyright 2019 AT&T Intellectual Property
// Copyright 2019 Nokia
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

//
// This source code is part of the near-RT RIC (RAN Intelligent Controller)
// platform project (RICP).

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.26.0
// 	protoc        v3.15.8
// source: gnb.proto

package entities

import (
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	reflect "reflect"
	sync "sync"
)

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 Nrscs int32

const (
	Nrscs_UNKNOWN_NRSCS Nrscs = 0
	Nrscs_SCS15         Nrscs = 1
	Nrscs_SCS30         Nrscs = 2
	Nrscs_SCS60         Nrscs = 3
	Nrscs_SCS120        Nrscs = 4
)

// Enum value maps for Nrscs.
var (
	Nrscs_name = map[int32]string{
		0: "UNKNOWN_NRSCS",
		1: "SCS15",
		2: "SCS30",
		3: "SCS60",
		4: "SCS120",
	}
	Nrscs_value = map[string]int32{
		"UNKNOWN_NRSCS": 0,
		"SCS15":         1,
		"SCS30":         2,
		"SCS60":         3,
		"SCS120":        4,
	}
)

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

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

func (Nrscs) Descriptor() protoreflect.EnumDescriptor {
	return file_gnb_proto_enumTypes[0].Descriptor()
}

func (Nrscs) Type() protoreflect.EnumType {
	return &file_gnb_proto_enumTypes[0]
}

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

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

type Ncnrb int32

const (
	Ncnrb_UNKNOWN_NCNRB Ncnrb = 0
	Ncnrb_NRB11         Ncnrb = 1
	Ncnrb_NRB18         Ncnrb = 2
	Ncnrb_NRB24         Ncnrb = 3
	Ncnrb_NRB25         Ncnrb = 4
	Ncnrb_NRB31         Ncnrb = 5
	Ncnrb_NRB32         Ncnrb = 6
	Ncnrb_NRB38         Ncnrb = 7
	Ncnrb_NRB51         Ncnrb = 8
	Ncnrb_NRB52         Ncnrb = 9
	Ncnrb_NRB65         Ncnrb = 10
	Ncnrb_NRB66         Ncnrb = 11
	Ncnrb_NRB78         Ncnrb = 12
	Ncnrb_NRB79         Ncnrb = 13
	Ncnrb_NRB93         Ncnrb = 14
	Ncnrb_NRB106        Ncnrb = 15
	Ncnrb_NRB107        Ncnrb = 16
	Ncnrb_NRB121        Ncnrb = 17
	Ncnrb_NRB132        Ncnrb = 18
	Ncnrb_NRB133        Ncnrb = 19
	Ncnrb_NRB135        Ncnrb = 20
	Ncnrb_NRB160        Ncnrb = 21
	Ncnrb_NRB162        Ncnrb = 22
	Ncnrb_NRB189        Ncnrb = 23
	Ncnrb_NRB216        Ncnrb = 24
	Ncnrb_NRB217        Ncnrb = 25
	Ncnrb_NRB245        Ncnrb = 26
	Ncnrb_NRB264        Ncnrb = 27
	Ncnrb_NRB270        Ncnrb = 28
	Ncnrb_NRB273        Ncnrb = 29
)

// Enum value maps for Ncnrb.
var (
	Ncnrb_name = map[int32]string{
		0:  "UNKNOWN_NCNRB",
		1:  "NRB11",
		2:  "NRB18",
		3:  "NRB24",
		4:  "NRB25",
		5:  "NRB31",
		6:  "NRB32",
		7:  "NRB38",
		8:  "NRB51",
		9:  "NRB52",
		10: "NRB65",
		11: "NRB66",
		12: "NRB78",
		13: "NRB79",
		14: "NRB93",
		15: "NRB106",
		16: "NRB107",
		17: "NRB121",
		18: "NRB132",
		19: "NRB133",
		20: "NRB135",
		21: "NRB160",
		22: "NRB162",
		23: "NRB189",
		24: "NRB216",
		25: "NRB217",
		26: "NRB245",
		27: "NRB264",
		28: "NRB270",
		29: "NRB273",
	}
	Ncnrb_value = map[string]int32{
		"UNKNOWN_NCNRB": 0,
		"NRB11":         1,
		"NRB18":         2,
		"NRB24":         3,
		"NRB25":         4,
		"NRB31":         5,
		"NRB32":         6,
		"NRB38":         7,
		"NRB51":         8,
		"NRB52":         9,
		"NRB65":         10,
		"NRB66":         11,
		"NRB78":         12,
		"NRB79":         13,
		"NRB93":         14,
		"NRB106":        15,
		"NRB107":        16,
		"NRB121":        17,
		"NRB132":        18,
		"NRB133":        19,
		"NRB135":        20,
		"NRB160":        21,
		"NRB162":        22,
		"NRB189":        23,
		"NRB216":        24,
		"NRB217":        25,
		"NRB245":        26,
		"NRB264":        27,
		"NRB270":        28,
		"NRB273":        29,
	}
)

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

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

func (Ncnrb) Descriptor() protoreflect.EnumDescriptor {
	return file_gnb_proto_enumTypes[1].Descriptor()
}

func (Ncnrb) Type() protoreflect.EnumType {
	return &file_gnb_proto_enumTypes[1]
}

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

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

type Nr_Mode int32

const (
	Nr_UNKNOWN Nr_Mode = 0
	Nr_FDD     Nr_Mode = 1
	Nr_TDD     Nr_Mode = 2
)

// Enum value maps for Nr_Mode.
var (
	Nr_Mode_name = map[int32]string{
		0: "UNKNOWN",
		1: "FDD",
		2: "TDD",
	}
	Nr_Mode_value = map[string]int32{
		"UNKNOWN": 0,
		"FDD":     1,
		"TDD":     2,
	}
)

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

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

func (Nr_Mode) Descriptor() protoreflect.EnumDescriptor {
	return file_gnb_proto_enumTypes[2].Descriptor()
}

func (Nr_Mode) Type() protoreflect.EnumType {
	return &file_gnb_proto_enumTypes[2]
}

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

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

type Gnb struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	ServedNrCells []*ServedNRCell          `protobuf:"bytes,1,rep,name=served_nr_cells,json=servedNrCells,proto3" json:"served_nr_cells,omitempty"`
	RanFunctions  []*RanFunction           `protobuf:"bytes,2,rep,name=ran_functions,json=ranFunctions,proto3" json:"ran_functions,omitempty"`
	GnbType       GnbType                  `protobuf:"varint,3,opt,name=gnb_type,json=gnbType,proto3,enum=entities.GnbType" json:"gnb_type,omitempty"`
	NodeConfigs   []*E2NodeComponentConfig `protobuf:"bytes,4,rep,name=node_configs,json=nodeConfigs,proto3" json:"node_configs,omitempty"`
}

func (x *Gnb) Reset() {
	*x = Gnb{}
	if protoimpl.UnsafeEnabled {
		mi := &file_gnb_proto_msgTypes[0]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

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

func (*Gnb) ProtoMessage() {}

func (x *Gnb) ProtoReflect() protoreflect.Message {
	mi := &file_gnb_proto_msgTypes[0]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use Gnb.ProtoReflect.Descriptor instead.
func (*Gnb) Descriptor() ([]byte, []int) {
	return file_gnb_proto_rawDescGZIP(), []int{0}
}

func (x *Gnb) GetServedNrCells() []*ServedNRCell {
	if x != nil {
		return x.ServedNrCells
	}
	return nil
}

func (x *Gnb) GetRanFunctions() []*RanFunction {
	if x != nil {
		return x.RanFunctions
	}
	return nil
}

func (x *Gnb) GetGnbType() GnbType {
	if x != nil {
		return x.GnbType
	}
	return GnbType_UNKNOWN_GNB_TYPE
}

func (x *Gnb) GetNodeConfigs() []*E2NodeComponentConfig {
	if x != nil {
		return x.NodeConfigs
	}
	return nil
}

type ServedNRCell struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	ServedNrCellInformation *ServedNRCellInformation  `protobuf:"bytes,1,opt,name=served_nr_cell_information,json=servedNrCellInformation,proto3" json:"served_nr_cell_information,omitempty"`
	NrNeighbourInfos        []*NrNeighbourInformation `protobuf:"bytes,2,rep,name=nr_neighbour_infos,json=nrNeighbourInfos,proto3" json:"nr_neighbour_infos,omitempty"`
}

func (x *ServedNRCell) Reset() {
	*x = ServedNRCell{}
	if protoimpl.UnsafeEnabled {
		mi := &file_gnb_proto_msgTypes[1]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

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

func (*ServedNRCell) ProtoMessage() {}

func (x *ServedNRCell) ProtoReflect() protoreflect.Message {
	mi := &file_gnb_proto_msgTypes[1]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use ServedNRCell.ProtoReflect.Descriptor instead.
func (*ServedNRCell) Descriptor() ([]byte, []int) {
	return file_gnb_proto_rawDescGZIP(), []int{1}
}

func (x *ServedNRCell) GetServedNrCellInformation() *ServedNRCellInformation {
	if x != nil {
		return x.ServedNrCellInformation
	}
	return nil
}

func (x *ServedNRCell) GetNrNeighbourInfos() []*NrNeighbourInformation {
	if x != nil {
		return x.NrNeighbourInfos
	}
	return nil
}

type ServedNRCellInformation struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	NrPci                     uint32                                `protobuf:"varint,1,opt,name=nr_pci,json=nrPci,proto3" json:"nr_pci,omitempty"`
	CellId                    string                                `protobuf:"bytes,2,opt,name=cell_id,json=cellId,proto3" json:"cell_id,omitempty"`
	Stac5G                    string                                `protobuf:"bytes,3,opt,name=stac5g,proto3" json:"stac5g,omitempty"`
	ConfiguredStac            string                                `protobuf:"bytes,4,opt,name=configured_stac,json=configuredStac,proto3" json:"configured_stac,omitempty"`
	ServedPlmns               []string                              `protobuf:"bytes,5,rep,name=served_plmns,json=servedPlmns,proto3" json:"served_plmns,omitempty"`
	NrMode                    Nr_Mode                               `protobuf:"varint,6,opt,name=nr_mode,json=nrMode,proto3,enum=entities.Nr_Mode" json:"nr_mode,omitempty"`
	ChoiceNrMode              *ServedNRCellInformation_ChoiceNRMode `protobuf:"bytes,7,opt,name=choice_nr_mode,json=choiceNrMode,proto3" json:"choice_nr_mode,omitempty"`
	AdditionalCellInformation *AdditionalCellInformation            `protobuf:"bytes,8,opt,name=additional_cell_information,json=additionalCellInformation,proto3" json:"additional_cell_information,omitempty"`
}

func (x *ServedNRCellInformation) Reset() {
	*x = ServedNRCellInformation{}
	if protoimpl.UnsafeEnabled {
		mi := &file_gnb_proto_msgTypes[2]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

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

func (*ServedNRCellInformation) ProtoMessage() {}

func (x *ServedNRCellInformation) ProtoReflect() protoreflect.Message {
	mi := &file_gnb_proto_msgTypes[2]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use ServedNRCellInformation.ProtoReflect.Descriptor instead.
func (*ServedNRCellInformation) Descriptor() ([]byte, []int) {
	return file_gnb_proto_rawDescGZIP(), []int{2}
}

func (x *ServedNRCellInformation) GetNrPci() uint32 {
	if x != nil {
		return x.NrPci
	}
	return 0
}

func (x *ServedNRCellInformation) GetCellId() string {
	if x != nil {
		return x.CellId
	}
	return ""
}

func (x *ServedNRCellInformation) GetStac5G() string {
	if x != nil {
		return x.Stac5G
	}
	return ""
}

func (x *ServedNRCellInformation) GetConfiguredStac() string {
	if x != nil {
		return x.ConfiguredStac
	}
	return ""
}

func (x *ServedNRCellInformation) GetServedPlmns() []string {
	if x != nil {
		return x.ServedPlmns
	}
	return nil
}

func (x *ServedNRCellInformation) GetNrMode() Nr_Mode {
	if x != nil {
		return x.NrMode
	}
	return Nr_UNKNOWN
}

func (x *ServedNRCellInformation) GetChoiceNrMode() *ServedNRCellInformation_ChoiceNRMode {
	if x != nil {
		return x.ChoiceNrMode
	}
	return nil
}

func (x *ServedNRCellInformation) GetAdditionalCellInformation() *AdditionalCellInformation {
	if x != nil {
		return x.AdditionalCellInformation
	}
	return nil
}

type Nr struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields
}

func (x *Nr) Reset() {
	*x = Nr{}
	if protoimpl.UnsafeEnabled {
		mi := &file_gnb_proto_msgTypes[3]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

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

func (*Nr) ProtoMessage() {}

func (x *Nr) ProtoReflect() protoreflect.Message {
	mi := &file_gnb_proto_msgTypes[3]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use Nr.ProtoReflect.Descriptor instead.
func (*Nr) Descriptor() ([]byte, []int) {
	return file_gnb_proto_rawDescGZIP(), []int{3}
}

type NrFrequencyInfo struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	NrArFcn        uint64                          `protobuf:"varint,1,opt,name=nr_ar_fcn,json=nrArFcn,proto3" json:"nr_ar_fcn,omitempty"`
	SulInformation *NrFrequencyInfo_SulInformation `protobuf:"bytes,3,opt,name=sulInformation,proto3" json:"sulInformation,omitempty"`
	FrequencyBands []*FrequencyBandItem            `protobuf:"bytes,4,rep,name=frequency_bands,json=frequencyBands,proto3" json:"frequency_bands,omitempty"`
}

func (x *NrFrequencyInfo) Reset() {
	*x = NrFrequencyInfo{}
	if protoimpl.UnsafeEnabled {
		mi := &file_gnb_proto_msgTypes[4]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

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

func (*NrFrequencyInfo) ProtoMessage() {}

func (x *NrFrequencyInfo) ProtoReflect() protoreflect.Message {
	mi := &file_gnb_proto_msgTypes[4]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use NrFrequencyInfo.ProtoReflect.Descriptor instead.
func (*NrFrequencyInfo) Descriptor() ([]byte, []int) {
	return file_gnb_proto_rawDescGZIP(), []int{4}
}

func (x *NrFrequencyInfo) GetNrArFcn() uint64 {
	if x != nil {
		return x.NrArFcn
	}
	return 0
}

func (x *NrFrequencyInfo) GetSulInformation() *NrFrequencyInfo_SulInformation {
	if x != nil {
		return x.SulInformation
	}
	return nil
}

func (x *NrFrequencyInfo) GetFrequencyBands() []*FrequencyBandItem {
	if x != nil {
		return x.FrequencyBands
	}
	return nil
}

type FrequencyBandItem struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	NrFrequencyBand   uint32   `protobuf:"varint,1,opt,name=nr_frequency_band,json=nrFrequencyBand,proto3" json:"nr_frequency_band,omitempty"`
	SupportedSulBands []uint32 `protobuf:"varint,2,rep,packed,name=supported_sul_bands,json=supportedSulBands,proto3" json:"supported_sul_bands,omitempty"`
}

func (x *FrequencyBandItem) Reset() {
	*x = FrequencyBandItem{}
	if protoimpl.UnsafeEnabled {
		mi := &file_gnb_proto_msgTypes[5]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

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

func (*FrequencyBandItem) ProtoMessage() {}

func (x *FrequencyBandItem) ProtoReflect() protoreflect.Message {
	mi := &file_gnb_proto_msgTypes[5]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use FrequencyBandItem.ProtoReflect.Descriptor instead.
func (*FrequencyBandItem) Descriptor() ([]byte, []int) {
	return file_gnb_proto_rawDescGZIP(), []int{5}
}

func (x *FrequencyBandItem) GetNrFrequencyBand() uint32 {
	if x != nil {
		return x.NrFrequencyBand
	}
	return 0
}

func (x *FrequencyBandItem) GetSupportedSulBands() []uint32 {
	if x != nil {
		return x.SupportedSulBands
	}
	return nil
}

type NrTransmissionBandwidth struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	Nrscs Nrscs `protobuf:"varint,1,opt,name=nrscs,proto3,enum=entities.Nrscs" json:"nrscs,omitempty"`
	Ncnrb Ncnrb `protobuf:"varint,2,opt,name=ncnrb,proto3,enum=entities.Ncnrb" json:"ncnrb,omitempty"`
}

func (x *NrTransmissionBandwidth) Reset() {
	*x = NrTransmissionBandwidth{}
	if protoimpl.UnsafeEnabled {
		mi := &file_gnb_proto_msgTypes[6]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

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

func (*NrTransmissionBandwidth) ProtoMessage() {}

func (x *NrTransmissionBandwidth) ProtoReflect() protoreflect.Message {
	mi := &file_gnb_proto_msgTypes[6]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use NrTransmissionBandwidth.ProtoReflect.Descriptor instead.
func (*NrTransmissionBandwidth) Descriptor() ([]byte, []int) {
	return file_gnb_proto_rawDescGZIP(), []int{6}
}

func (x *NrTransmissionBandwidth) GetNrscs() Nrscs {
	if x != nil {
		return x.Nrscs
	}
	return Nrscs_UNKNOWN_NRSCS
}

func (x *NrTransmissionBandwidth) GetNcnrb() Ncnrb {
	if x != nil {
		return x.Ncnrb
	}
	return Ncnrb_UNKNOWN_NCNRB
}

type NrNeighbourInformation struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	NrPci          uint32                               `protobuf:"varint,1,opt,name=nr_pci,json=nrPci,proto3" json:"nr_pci,omitempty"`
	NrCgi          string                               `protobuf:"bytes,2,opt,name=nr_cgi,json=nrCgi,proto3" json:"nr_cgi,omitempty"`
	NrMode         Nr_Mode                              `protobuf:"varint,3,opt,name=nr_mode,json=nrMode,proto3,enum=entities.Nr_Mode" json:"nr_mode,omitempty"`
	ChoiceNrMode   *NrNeighbourInformation_ChoiceNRMode `protobuf:"bytes,4,opt,name=choice_nr_mode,json=choiceNrMode,proto3" json:"choice_nr_mode,omitempty"`
	Stac5G         string                               `protobuf:"bytes,5,opt,name=stac5g,proto3" json:"stac5g,omitempty"`
	ConfiguredStac string                               `protobuf:"bytes,6,opt,name=configured_stac,json=configuredStac,proto3" json:"configured_stac,omitempty"`
}

func (x *NrNeighbourInformation) Reset() {
	*x = NrNeighbourInformation{}
	if protoimpl.UnsafeEnabled {
		mi := &file_gnb_proto_msgTypes[7]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

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

func (*NrNeighbourInformation) ProtoMessage() {}

func (x *NrNeighbourInformation) ProtoReflect() protoreflect.Message {
	mi := &file_gnb_proto_msgTypes[7]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use NrNeighbourInformation.ProtoReflect.Descriptor instead.
func (*NrNeighbourInformation) Descriptor() ([]byte, []int) {
	return file_gnb_proto_rawDescGZIP(), []int{7}
}

func (x *NrNeighbourInformation) GetNrPci() uint32 {
	if x != nil {
		return x.NrPci
	}
	return 0
}

func (x *NrNeighbourInformation) GetNrCgi() string {
	if x != nil {
		return x.NrCgi
	}
	return ""
}

func (x *NrNeighbourInformation) GetNrMode() Nr_Mode {
	if x != nil {
		return x.NrMode
	}
	return Nr_UNKNOWN
}

func (x *NrNeighbourInformation) GetChoiceNrMode() *NrNeighbourInformation_ChoiceNRMode {
	if x != nil {
		return x.ChoiceNrMode
	}
	return nil
}

func (x *NrNeighbourInformation) GetStac5G() string {
	if x != nil {
		return x.Stac5G
	}
	return ""
}

func (x *NrNeighbourInformation) GetConfiguredStac() string {
	if x != nil {
		return x.ConfiguredStac
	}
	return ""
}

type ServedNRCellInformation_ChoiceNRMode struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	Fdd *ServedNRCellInformation_ChoiceNRMode_FddInfo `protobuf:"bytes,1,opt,name=fdd,proto3" json:"fdd,omitempty"`
	Tdd *ServedNRCellInformation_ChoiceNRMode_TddInfo `protobuf:"bytes,2,opt,name=tdd,proto3" json:"tdd,omitempty"`
}

func (x *ServedNRCellInformation_ChoiceNRMode) Reset() {
	*x = ServedNRCellInformation_ChoiceNRMode{}
	if protoimpl.UnsafeEnabled {
		mi := &file_gnb_proto_msgTypes[8]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

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

func (*ServedNRCellInformation_ChoiceNRMode) ProtoMessage() {}

func (x *ServedNRCellInformation_ChoiceNRMode) ProtoReflect() protoreflect.Message {
	mi := &file_gnb_proto_msgTypes[8]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use ServedNRCellInformation_ChoiceNRMode.ProtoReflect.Descriptor instead.
func (*ServedNRCellInformation_ChoiceNRMode) Descriptor() ([]byte, []int) {
	return file_gnb_proto_rawDescGZIP(), []int{2, 0}
}

func (x *ServedNRCellInformation_ChoiceNRMode) GetFdd() *ServedNRCellInformation_ChoiceNRMode_FddInfo {
	if x != nil {
		return x.Fdd
	}
	return nil
}

func (x *ServedNRCellInformation_ChoiceNRMode) GetTdd() *ServedNRCellInformation_ChoiceNRMode_TddInfo {
	if x != nil {
		return x.Tdd
	}
	return nil
}

type ServedNRCellInformation_ChoiceNRMode_FddInfo struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	UlFreqInfo              *NrFrequencyInfo         `protobuf:"bytes,1,opt,name=ul_freq_info,json=ulFreqInfo,proto3" json:"ul_freq_info,omitempty"`
	DlFreqInfo              *NrFrequencyInfo         `protobuf:"bytes,2,opt,name=dl_freq_info,json=dlFreqInfo,proto3" json:"dl_freq_info,omitempty"`
	UlTransmissionBandwidth *NrTransmissionBandwidth `protobuf:"bytes,3,opt,name=ul_transmission_bandwidth,json=ulTransmissionBandwidth,proto3" json:"ul_transmission_bandwidth,omitempty"`
	DlTransmissionBandwidth *NrTransmissionBandwidth `protobuf:"bytes,4,opt,name=dl_transmission_bandwidth,json=dlTransmissionBandwidth,proto3" json:"dl_transmission_bandwidth,omitempty"`
}

func (x *ServedNRCellInformation_ChoiceNRMode_FddInfo) Reset() {
	*x = ServedNRCellInformation_ChoiceNRMode_FddInfo{}
	if protoimpl.UnsafeEnabled {
		mi := &file_gnb_proto_msgTypes[9]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

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

func (*ServedNRCellInformation_ChoiceNRMode_FddInfo) ProtoMessage() {}

func (x *ServedNRCellInformation_ChoiceNRMode_FddInfo) ProtoReflect() protoreflect.Message {
	mi := &file_gnb_proto_msgTypes[9]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use ServedNRCellInformation_ChoiceNRMode_FddInfo.ProtoReflect.Descriptor instead.
func (*ServedNRCellInformation_ChoiceNRMode_FddInfo) Descriptor() ([]byte, []int) {
	return file_gnb_proto_rawDescGZIP(), []int{2, 0, 0}
}

func (x *ServedNRCellInformation_ChoiceNRMode_FddInfo) GetUlFreqInfo() *NrFrequencyInfo {
	if x != nil {
		return x.UlFreqInfo
	}
	return nil
}

func (x *ServedNRCellInformation_ChoiceNRMode_FddInfo) GetDlFreqInfo() *NrFrequencyInfo {
	if x != nil {
		return x.DlFreqInfo
	}
	return nil
}

func (x *ServedNRCellInformation_ChoiceNRMode_FddInfo) GetUlTransmissionBandwidth() *NrTransmissionBandwidth {
	if x != nil {
		return x.UlTransmissionBandwidth
	}
	return nil
}

func (x *ServedNRCellInformation_ChoiceNRMode_FddInfo) GetDlTransmissionBandwidth() *NrTransmissionBandwidth {
	if x != nil {
		return x.DlTransmissionBandwidth
	}
	return nil
}

type ServedNRCellInformation_ChoiceNRMode_TddInfo struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	NrFreqInfo            *NrFrequencyInfo         `protobuf:"bytes,1,opt,name=nr_freq_info,json=nrFreqInfo,proto3" json:"nr_freq_info,omitempty"`
	TransmissionBandwidth *NrTransmissionBandwidth `protobuf:"bytes,2,opt,name=transmission_bandwidth,json=transmissionBandwidth,proto3" json:"transmission_bandwidth,omitempty"`
}

func (x *ServedNRCellInformation_ChoiceNRMode_TddInfo) Reset() {
	*x = ServedNRCellInformation_ChoiceNRMode_TddInfo{}
	if protoimpl.UnsafeEnabled {
		mi := &file_gnb_proto_msgTypes[10]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

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

func (*ServedNRCellInformation_ChoiceNRMode_TddInfo) ProtoMessage() {}

func (x *ServedNRCellInformation_ChoiceNRMode_TddInfo) ProtoReflect() protoreflect.Message {
	mi := &file_gnb_proto_msgTypes[10]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use ServedNRCellInformation_ChoiceNRMode_TddInfo.ProtoReflect.Descriptor instead.
func (*ServedNRCellInformation_ChoiceNRMode_TddInfo) Descriptor() ([]byte, []int) {
	return file_gnb_proto_rawDescGZIP(), []int{2, 0, 1}
}

func (x *ServedNRCellInformation_ChoiceNRMode_TddInfo) GetNrFreqInfo() *NrFrequencyInfo {
	if x != nil {
		return x.NrFreqInfo
	}
	return nil
}

func (x *ServedNRCellInformation_ChoiceNRMode_TddInfo) GetTransmissionBandwidth() *NrTransmissionBandwidth {
	if x != nil {
		return x.TransmissionBandwidth
	}
	return nil
}

type NrFrequencyInfo_SulInformation struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	SulArFcn                 uint64                   `protobuf:"varint,1,opt,name=sul_ar_fcn,json=sulArFcn,proto3" json:"sul_ar_fcn,omitempty"`
	SulTransmissionBandwidth *NrTransmissionBandwidth `protobuf:"bytes,2,opt,name=sul_transmission_bandwidth,json=sulTransmissionBandwidth,proto3" json:"sul_transmission_bandwidth,omitempty"`
}

func (x *NrFrequencyInfo_SulInformation) Reset() {
	*x = NrFrequencyInfo_SulInformation{}
	if protoimpl.UnsafeEnabled {
		mi := &file_gnb_proto_msgTypes[11]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

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

func (*NrFrequencyInfo_SulInformation) ProtoMessage() {}

func (x *NrFrequencyInfo_SulInformation) ProtoReflect() protoreflect.Message {
	mi := &file_gnb_proto_msgTypes[11]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use NrFrequencyInfo_SulInformation.ProtoReflect.Descriptor instead.
func (*NrFrequencyInfo_SulInformation) Descriptor() ([]byte, []int) {
	return file_gnb_proto_rawDescGZIP(), []int{4, 0}
}

func (x *NrFrequencyInfo_SulInformation) GetSulArFcn() uint64 {
	if x != nil {
		return x.SulArFcn
	}
	return 0
}

func (x *NrFrequencyInfo_SulInformation) GetSulTransmissionBandwidth() *NrTransmissionBandwidth {
	if x != nil {
		return x.SulTransmissionBandwidth
	}
	return nil
}

type NrNeighbourInformation_ChoiceNRMode struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	Fdd *NrNeighbourInformation_ChoiceNRMode_FddInfo `protobuf:"bytes,1,opt,name=fdd,proto3" json:"fdd,omitempty"`
	Tdd *NrNeighbourInformation_ChoiceNRMode_TddInfo `protobuf:"bytes,2,opt,name=tdd,proto3" json:"tdd,omitempty"`
}

func (x *NrNeighbourInformation_ChoiceNRMode) Reset() {
	*x = NrNeighbourInformation_ChoiceNRMode{}
	if protoimpl.UnsafeEnabled {
		mi := &file_gnb_proto_msgTypes[12]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

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

func (*NrNeighbourInformation_ChoiceNRMode) ProtoMessage() {}

func (x *NrNeighbourInformation_ChoiceNRMode) ProtoReflect() protoreflect.Message {
	mi := &file_gnb_proto_msgTypes[12]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use NrNeighbourInformation_ChoiceNRMode.ProtoReflect.Descriptor instead.
func (*NrNeighbourInformation_ChoiceNRMode) Descriptor() ([]byte, []int) {
	return file_gnb_proto_rawDescGZIP(), []int{7, 0}
}

func (x *NrNeighbourInformation_ChoiceNRMode) GetFdd() *NrNeighbourInformation_ChoiceNRMode_FddInfo {
	if x != nil {
		return x.Fdd
	}
	return nil
}

func (x *NrNeighbourInformation_ChoiceNRMode) GetTdd() *NrNeighbourInformation_ChoiceNRMode_TddInfo {
	if x != nil {
		return x.Tdd
	}
	return nil
}

type NrNeighbourInformation_ChoiceNRMode_FddInfo struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	UlarFcnFreqInfo *NrFrequencyInfo `protobuf:"bytes,1,opt,name=ular_fcn_freq_info,json=ularFcnFreqInfo,proto3" json:"ular_fcn_freq_info,omitempty"`
	DlarFcnFreqInfo *NrFrequencyInfo `protobuf:"bytes,2,opt,name=dlar_fcn_freq_info,json=dlarFcnFreqInfo,proto3" json:"dlar_fcn_freq_info,omitempty"`
}

func (x *NrNeighbourInformation_ChoiceNRMode_FddInfo) Reset() {
	*x = NrNeighbourInformation_ChoiceNRMode_FddInfo{}
	if protoimpl.UnsafeEnabled {
		mi := &file_gnb_proto_msgTypes[13]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

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

func (*NrNeighbourInformation_ChoiceNRMode_FddInfo) ProtoMessage() {}

func (x *NrNeighbourInformation_ChoiceNRMode_FddInfo) ProtoReflect() protoreflect.Message {
	mi := &file_gnb_proto_msgTypes[13]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use NrNeighbourInformation_ChoiceNRMode_FddInfo.ProtoReflect.Descriptor instead.
func (*NrNeighbourInformation_ChoiceNRMode_FddInfo) Descriptor() ([]byte, []int) {
	return file_gnb_proto_rawDescGZIP(), []int{7, 0, 0}
}

func (x *NrNeighbourInformation_ChoiceNRMode_FddInfo) GetUlarFcnFreqInfo() *NrFrequencyInfo {
	if x != nil {
		return x.UlarFcnFreqInfo
	}
	return nil
}

func (x *NrNeighbourInformation_ChoiceNRMode_FddInfo) GetDlarFcnFreqInfo() *NrFrequencyInfo {
	if x != nil {
		return x.DlarFcnFreqInfo
	}
	return nil
}

type NrNeighbourInformation_ChoiceNRMode_TddInfo struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	ArFcnNrFreqInfo *NrFrequencyInfo `protobuf:"bytes,1,opt,name=ar_fcn_nr_freq_info,json=arFcnNrFreqInfo,proto3" json:"ar_fcn_nr_freq_info,omitempty"`
}

func (x *NrNeighbourInformation_ChoiceNRMode_TddInfo) Reset() {
	*x = NrNeighbourInformation_ChoiceNRMode_TddInfo{}
	if protoimpl.UnsafeEnabled {
		mi := &file_gnb_proto_msgTypes[14]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

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

func (*NrNeighbourInformation_ChoiceNRMode_TddInfo) ProtoMessage() {}

func (x *NrNeighbourInformation_ChoiceNRMode_TddInfo) ProtoReflect() protoreflect.Message {
	mi := &file_gnb_proto_msgTypes[14]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use NrNeighbourInformation_ChoiceNRMode_TddInfo.ProtoReflect.Descriptor instead.
func (*NrNeighbourInformation_ChoiceNRMode_TddInfo) Descriptor() ([]byte, []int) {
	return file_gnb_proto_rawDescGZIP(), []int{7, 0, 1}
}

func (x *NrNeighbourInformation_ChoiceNRMode_TddInfo) GetArFcnNrFreqInfo() *NrFrequencyInfo {
	if x != nil {
		return x.ArFcnNrFreqInfo
	}
	return nil
}

var File_gnb_proto protoreflect.FileDescriptor

var file_gnb_proto_rawDesc = []byte{
	0x0a, 0x09, 0x67, 0x6e, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x65, 0x6e, 0x74,
	0x69, 0x74, 0x69, 0x65, 0x73, 0x1a, 0x12, 0x72, 0x61, 0x6e, 0x5f, 0x66, 0x75, 0x6e, 0x63, 0x74,
	0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x65, 0x32, 0x6e, 0x6f, 0x64,
	0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66,
	0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69,
	0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x63, 0x65, 0x6c, 0x6c, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d,
	0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0e, 0x6e, 0x62, 0x5f,
	0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf3, 0x01, 0x0a, 0x03,
	0x47, 0x6e, 0x62, 0x12, 0x3e, 0x0a, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x6e, 0x72,
	0x5f, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65,
	0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x64, 0x4e, 0x52,
	0x43, 0x65, 0x6c, 0x6c, 0x52, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x4e, 0x72, 0x43, 0x65,
	0x6c, 0x6c, 0x73, 0x12, 0x3a, 0x0a, 0x0d, 0x72, 0x61, 0x6e, 0x5f, 0x66, 0x75, 0x6e, 0x63, 0x74,
	0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x65, 0x6e, 0x74,
	0x69, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x52, 0x61, 0x6e, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
	0x6e, 0x52, 0x0c, 0x72, 0x61, 0x6e, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12,
	0x2c, 0x0a, 0x08, 0x67, 0x6e, 0x62, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
	0x0e, 0x32, 0x11, 0x2e, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x47, 0x6e, 0x62,
	0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x67, 0x6e, 0x62, 0x54, 0x79, 0x70, 0x65, 0x12, 0x42, 0x0a,
	0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x04, 0x20,
	0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x45,
	0x32, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x43, 0x6f,
	0x6e, 0x66, 0x69, 0x67, 0x52, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
	0x73, 0x22, 0xbe, 0x01, 0x0a, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x64, 0x4e, 0x52, 0x43, 0x65,
	0x6c, 0x6c, 0x12, 0x5e, 0x0a, 0x1a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x6e, 0x72, 0x5f,
	0x63, 0x65, 0x6c, 0x6c, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e,
	0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65,
	0x73, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x64, 0x4e, 0x52, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e,
	0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x17, 0x73, 0x65, 0x72, 0x76, 0x65,
	0x64, 0x4e, 0x72, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69,
	0x6f, 0x6e, 0x12, 0x4e, 0x0a, 0x12, 0x6e, 0x72, 0x5f, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f,
	0x75, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20,
	0x2e, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x4e, 0x72, 0x4e, 0x65, 0x69, 0x67,
	0x68, 0x62, 0x6f, 0x75, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e,
	0x52, 0x10, 0x6e, 0x72, 0x4e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x75, 0x72, 0x49, 0x6e, 0x66,
	0x6f, 0x73, 0x22, 0xa0, 0x08, 0x0a, 0x17, 0x53, 0x65, 0x72, 0x76, 0x65, 0x64, 0x4e, 0x52, 0x43,
	0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15,
	0x0a, 0x06, 0x6e, 0x72, 0x5f, 0x70, 0x63, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05,
	0x6e, 0x72, 0x50, 0x63, 0x69, 0x12, 0x17, 0x0a, 0x07, 0x63, 0x65, 0x6c, 0x6c, 0x5f, 0x69, 0x64,
	0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x65, 0x6c, 0x6c, 0x49, 0x64, 0x12, 0x16,
	0x0a, 0x06, 0x73, 0x74, 0x61, 0x63, 0x35, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
	0x73, 0x74, 0x61, 0x63, 0x35, 0x67, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
	0x75, 0x72, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
	0x0e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x64, 0x53, 0x74, 0x61, 0x63, 0x12,
	0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x70, 0x6c, 0x6d, 0x6e, 0x73, 0x18,
	0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x50, 0x6c, 0x6d,
	0x6e, 0x73, 0x12, 0x2a, 0x0a, 0x07, 0x6e, 0x72, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x06, 0x20,
	0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x4e,
	0x72, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x06, 0x6e, 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x54,
	0x0a, 0x0e, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x72, 0x5f, 0x6d, 0x6f, 0x64, 0x65,
	0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65,
	0x73, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x64, 0x4e, 0x52, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e,
	0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65,
	0x4e, 0x52, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x0c, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x4e, 0x72,
	0x4d, 0x6f, 0x64, 0x65, 0x12, 0x63, 0x0a, 0x1b, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e,
	0x61, 0x6c, 0x5f, 0x63, 0x65, 0x6c, 0x6c, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,
	0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x74, 0x69,
	0x74, 0x69, 0x65, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43,
	0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x19,
	0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e,
	0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x89, 0x05, 0x0a, 0x0c, 0x43, 0x68,
	0x6f, 0x69, 0x63, 0x65, 0x4e, 0x52, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x48, 0x0a, 0x03, 0x66, 0x64,
	0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69,
	0x65, 0x73, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x64, 0x4e, 0x52, 0x43, 0x65, 0x6c, 0x6c, 0x49,
	0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63,
	0x65, 0x4e, 0x52, 0x4d, 0x6f, 0x64, 0x65, 0x2e, 0x46, 0x64, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x52,
	0x03, 0x66, 0x64, 0x64, 0x12, 0x48, 0x0a, 0x03, 0x74, 0x64, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
	0x0b, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x53, 0x65, 0x72,
	0x76, 0x65, 0x64, 0x4e, 0x52, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61,
	0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x4e, 0x52, 0x4d, 0x6f, 0x64,
	0x65, 0x2e, 0x54, 0x64, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x03, 0x74, 0x64, 0x64, 0x1a, 0xc1,
	0x02, 0x0a, 0x07, 0x46, 0x64, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3b, 0x0a, 0x0c, 0x75, 0x6c,
	0x5f, 0x66, 0x72, 0x65, 0x71, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
	0x32, 0x19, 0x2e, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x4e, 0x72, 0x46, 0x72,
	0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x75, 0x6c, 0x46,
	0x72, 0x65, 0x71, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3b, 0x0a, 0x0c, 0x64, 0x6c, 0x5f, 0x66, 0x72,
	0x65, 0x71, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e,
	0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x4e, 0x72, 0x46, 0x72, 0x65, 0x71, 0x75,
	0x65, 0x6e, 0x63, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x64, 0x6c, 0x46, 0x72, 0x65, 0x71,
	0x49, 0x6e, 0x66, 0x6f, 0x12, 0x5d, 0x0a, 0x19, 0x75, 0x6c, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73,
	0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74,
	0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69,
	0x65, 0x73, 0x2e, 0x4e, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f,
	0x6e, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x52, 0x17, 0x75, 0x6c, 0x54, 0x72,
	0x61, 0x6e, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69,
	0x64, 0x74, 0x68, 0x12, 0x5d, 0x0a, 0x19, 0x64, 0x6c, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6d,
	0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68,
	0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65,
	0x73, 0x2e, 0x4e, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e,
	0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x52, 0x17, 0x64, 0x6c, 0x54, 0x72, 0x61,
	0x6e, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64,
	0x74, 0x68, 0x1a, 0xa0, 0x01, 0x0a, 0x07, 0x54, 0x64, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3b,
	0x0a, 0x0c, 0x6e, 0x72, 0x5f, 0x66, 0x72, 0x65, 0x71, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01,
	0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2e,
	0x4e, 0x72, 0x46, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52,
	0x0a, 0x6e, 0x72, 0x46, 0x72, 0x65, 0x71, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x58, 0x0a, 0x16, 0x74,
	0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x61, 0x6e, 0x64,
	0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e,
	0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x4e, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69,
	0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x52, 0x15,
	0x74, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x6e, 0x64,
	0x77, 0x69, 0x64, 0x74, 0x68, 0x22, 0x2b, 0x0a, 0x02, 0x4e, 0x72, 0x22, 0x25, 0x0a, 0x04, 0x4d,
	0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00,
	0x12, 0x07, 0x0a, 0x03, 0x46, 0x44, 0x44, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x44, 0x44,
	0x10, 0x02, 0x22, 0xd7, 0x02, 0x0a, 0x0f, 0x4e, 0x72, 0x46, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e,
	0x63, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x0a, 0x09, 0x6e, 0x72, 0x5f, 0x61, 0x72, 0x5f,
	0x66, 0x63, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x6e, 0x72, 0x41, 0x72, 0x46,
	0x63, 0x6e, 0x12, 0x50, 0x0a, 0x0e, 0x73, 0x75, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61,
	0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x74,
	0x69, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x4e, 0x72, 0x46, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63,
	0x79, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x53, 0x75, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61,
	0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x73, 0x75, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61,
	0x74, 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x0f, 0x66, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63,
	0x79, 0x5f, 0x62, 0x61, 0x6e, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e,
	0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x46, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e,
	0x63, 0x79, 0x42, 0x61, 0x6e, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x0e, 0x66, 0x72, 0x65, 0x71,
	0x75, 0x65, 0x6e, 0x63, 0x79, 0x42, 0x61, 0x6e, 0x64, 0x73, 0x1a, 0x8f, 0x01, 0x0a, 0x0e, 0x53,
	0x75, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a,
	0x0a, 0x73, 0x75, 0x6c, 0x5f, 0x61, 0x72, 0x5f, 0x66, 0x63, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28,
	0x04, 0x52, 0x08, 0x73, 0x75, 0x6c, 0x41, 0x72, 0x46, 0x63, 0x6e, 0x12, 0x5f, 0x0a, 0x1a, 0x73,
	0x75, 0x6c, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f,
	0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
	0x21, 0x2e, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x4e, 0x72, 0x54, 0x72, 0x61,
	0x6e, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64,
	0x74, 0x68, 0x52, 0x18, 0x73, 0x75, 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x73, 0x73,
	0x69, 0x6f, 0x6e, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x22, 0x6f, 0x0a, 0x11,
	0x46, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x42, 0x61, 0x6e, 0x64, 0x49, 0x74, 0x65,
	0x6d, 0x12, 0x2a, 0x0a, 0x11, 0x6e, 0x72, 0x5f, 0x66, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63,
	0x79, 0x5f, 0x62, 0x61, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x6e, 0x72,
	0x46, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x42, 0x61, 0x6e, 0x64, 0x12, 0x2e, 0x0a,
	0x13, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x75, 0x6c, 0x5f, 0x62,
	0x61, 0x6e, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x11, 0x73, 0x75, 0x70, 0x70,
	0x6f, 0x72, 0x74, 0x65, 0x64, 0x53, 0x75, 0x6c, 0x42, 0x61, 0x6e, 0x64, 0x73, 0x22, 0x67, 0x0a,
	0x17, 0x4e, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42,
	0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x12, 0x25, 0x0a, 0x05, 0x6e, 0x72, 0x73, 0x63,
	0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69,
	0x65, 0x73, 0x2e, 0x4e, 0x72, 0x73, 0x63, 0x73, 0x52, 0x05, 0x6e, 0x72, 0x73, 0x63, 0x73, 0x12,
	0x25, 0x0a, 0x05, 0x6e, 0x63, 0x6e, 0x72, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f,
	0x2e, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x4e, 0x63, 0x6e, 0x72, 0x62, 0x52,
	0x05, 0x6e, 0x63, 0x6e, 0x72, 0x62, 0x22, 0x9b, 0x05, 0x0a, 0x16, 0x4e, 0x72, 0x4e, 0x65, 0x69,
	0x67, 0x68, 0x62, 0x6f, 0x75, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f,
	0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x72, 0x5f, 0x70, 0x63, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28,
	0x0d, 0x52, 0x05, 0x6e, 0x72, 0x50, 0x63, 0x69, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x72, 0x5f, 0x63,
	0x67, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x72, 0x43, 0x67, 0x69, 0x12,
	0x2a, 0x0a, 0x07, 0x6e, 0x72, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e,
	0x32, 0x11, 0x2e, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x4e, 0x72, 0x2e, 0x4d,
	0x6f, 0x64, 0x65, 0x52, 0x06, 0x6e, 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x53, 0x0a, 0x0e, 0x63,
	0x68, 0x6f, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x72, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20,
	0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x4e,
	0x72, 0x4e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x75, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d,
	0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x4e, 0x52, 0x4d, 0x6f,
	0x64, 0x65, 0x52, 0x0c, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x4e, 0x72, 0x4d, 0x6f, 0x64, 0x65,
	0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x63, 0x35, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
	0x52, 0x06, 0x73, 0x74, 0x61, 0x63, 0x35, 0x67, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x66,
	0x69, 0x67, 0x75, 0x72, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x63, 0x18, 0x06, 0x20, 0x01, 0x28,
	0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x64, 0x53, 0x74, 0x61,
	0x63, 0x1a, 0x90, 0x03, 0x0a, 0x0c, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x4e, 0x52, 0x4d, 0x6f,
	0x64, 0x65, 0x12, 0x47, 0x0a, 0x03, 0x66, 0x64, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
	0x35, 0x2e, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x4e, 0x72, 0x4e, 0x65, 0x69,
	0x67, 0x68, 0x62, 0x6f, 0x75, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f,
	0x6e, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x4e, 0x52, 0x4d, 0x6f, 0x64, 0x65, 0x2e, 0x46,
	0x64, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x03, 0x66, 0x64, 0x64, 0x12, 0x47, 0x0a, 0x03, 0x74,
	0x64, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x65, 0x6e, 0x74, 0x69, 0x74,
	0x69, 0x65, 0x73, 0x2e, 0x4e, 0x72, 0x4e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x75, 0x72, 0x49,
	0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63,
	0x65, 0x4e, 0x52, 0x4d, 0x6f, 0x64, 0x65, 0x2e, 0x54, 0x64, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x52,
	0x03, 0x74, 0x64, 0x64, 0x1a, 0x99, 0x01, 0x0a, 0x07, 0x46, 0x64, 0x64, 0x49, 0x6e, 0x66, 0x6f,
	0x12, 0x46, 0x0a, 0x12, 0x75, 0x6c, 0x61, 0x72, 0x5f, 0x66, 0x63, 0x6e, 0x5f, 0x66, 0x72, 0x65,
	0x71, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65,
	0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x4e, 0x72, 0x46, 0x72, 0x65, 0x71, 0x75, 0x65,
	0x6e, 0x63, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0f, 0x75, 0x6c, 0x61, 0x72, 0x46, 0x63, 0x6e,
	0x46, 0x72, 0x65, 0x71, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x46, 0x0a, 0x12, 0x64, 0x6c, 0x61, 0x72,
	0x5f, 0x66, 0x63, 0x6e, 0x5f, 0x66, 0x72, 0x65, 0x71, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02,
	0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2e,
	0x4e, 0x72, 0x46, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52,
	0x0f, 0x64, 0x6c, 0x61, 0x72, 0x46, 0x63, 0x6e, 0x46, 0x72, 0x65, 0x71, 0x49, 0x6e, 0x66, 0x6f,
	0x1a, 0x52, 0x0a, 0x07, 0x54, 0x64, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x47, 0x0a, 0x13, 0x61,
	0x72, 0x5f, 0x66, 0x63, 0x6e, 0x5f, 0x6e, 0x72, 0x5f, 0x66, 0x72, 0x65, 0x71, 0x5f, 0x69, 0x6e,
	0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6e, 0x74, 0x69, 0x74,
	0x69, 0x65, 0x73, 0x2e, 0x4e, 0x72, 0x46, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x49,
	0x6e, 0x66, 0x6f, 0x52, 0x0f, 0x61, 0x72, 0x46, 0x63, 0x6e, 0x4e, 0x72, 0x46, 0x72, 0x65, 0x71,
	0x49, 0x6e, 0x66, 0x6f, 0x2a, 0x47, 0x0a, 0x05, 0x4e, 0x72, 0x73, 0x63, 0x73, 0x12, 0x11, 0x0a,
	0x0d, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x4e, 0x52, 0x53, 0x43, 0x53, 0x10, 0x00,
	0x12, 0x09, 0x0a, 0x05, 0x53, 0x43, 0x53, 0x31, 0x35, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x53,
	0x43, 0x53, 0x33, 0x30, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x43, 0x53, 0x36, 0x30, 0x10,
	0x03, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x43, 0x53, 0x31, 0x32, 0x30, 0x10, 0x04, 0x2a, 0xe8, 0x02,
	0x0a, 0x05, 0x4e, 0x63, 0x6e, 0x72, 0x62, 0x12, 0x11, 0x0a, 0x0d, 0x55, 0x4e, 0x4b, 0x4e, 0x4f,
	0x57, 0x4e, 0x5f, 0x4e, 0x43, 0x4e, 0x52, 0x42, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x4e, 0x52,
	0x42, 0x31, 0x31, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x4e, 0x52, 0x42, 0x31, 0x38, 0x10, 0x02,
	0x12, 0x09, 0x0a, 0x05, 0x4e, 0x52, 0x42, 0x32, 0x34, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x4e,
	0x52, 0x42, 0x32, 0x35, 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x4e, 0x52, 0x42, 0x33, 0x31, 0x10,
	0x05, 0x12, 0x09, 0x0a, 0x05, 0x4e, 0x52, 0x42, 0x33, 0x32, 0x10, 0x06, 0x12, 0x09, 0x0a, 0x05,
	0x4e, 0x52, 0x42, 0x33, 0x38, 0x10, 0x07, 0x12, 0x09, 0x0a, 0x05, 0x4e, 0x52, 0x42, 0x35, 0x31,
	0x10, 0x08, 0x12, 0x09, 0x0a, 0x05, 0x4e, 0x52, 0x42, 0x35, 0x32, 0x10, 0x09, 0x12, 0x09, 0x0a,
	0x05, 0x4e, 0x52, 0x42, 0x36, 0x35, 0x10, 0x0a, 0x12, 0x09, 0x0a, 0x05, 0x4e, 0x52, 0x42, 0x36,
	0x36, 0x10, 0x0b, 0x12, 0x09, 0x0a, 0x05, 0x4e, 0x52, 0x42, 0x37, 0x38, 0x10, 0x0c, 0x12, 0x09,
	0x0a, 0x05, 0x4e, 0x52, 0x42, 0x37, 0x39, 0x10, 0x0d, 0x12, 0x09, 0x0a, 0x05, 0x4e, 0x52, 0x42,
	0x39, 0x33, 0x10, 0x0e, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x52, 0x42, 0x31, 0x30, 0x36, 0x10, 0x0f,
	0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x52, 0x42, 0x31, 0x30, 0x37, 0x10, 0x10, 0x12, 0x0a, 0x0a, 0x06,
	0x4e, 0x52, 0x42, 0x31, 0x32, 0x31, 0x10, 0x11, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x52, 0x42, 0x31,
	0x33, 0x32, 0x10, 0x12, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x52, 0x42, 0x31, 0x33, 0x33, 0x10, 0x13,
	0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x52, 0x42, 0x31, 0x33, 0x35, 0x10, 0x14, 0x12, 0x0a, 0x0a, 0x06,
	0x4e, 0x52, 0x42, 0x31, 0x36, 0x30, 0x10, 0x15, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x52, 0x42, 0x31,
	0x36, 0x32, 0x10, 0x16, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x52, 0x42, 0x31, 0x38, 0x39, 0x10, 0x17,
	0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x52, 0x42, 0x32, 0x31, 0x36, 0x10, 0x18, 0x12, 0x0a, 0x0a, 0x06,
	0x4e, 0x52, 0x42, 0x32, 0x31, 0x37, 0x10, 0x19, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x52, 0x42, 0x32,
	0x34, 0x35, 0x10, 0x1a, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x52, 0x42, 0x32, 0x36, 0x34, 0x10, 0x1b,
	0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x52, 0x42, 0x32, 0x37, 0x30, 0x10, 0x1c, 0x12, 0x0a, 0x0a, 0x06,
	0x4e, 0x52, 0x42, 0x32, 0x37, 0x33, 0x10, 0x1d, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x65, 0x72, 0x72,
	0x69, 0x74, 0x2e, 0x6f, 0x2d, 0x72, 0x61, 0x6e, 0x2d, 0x73, 0x63, 0x2e, 0x6f, 0x72, 0x67, 0x2f,
	0x72, 0x2f, 0x72, 0x69, 0x63, 0x2d, 0x70, 0x6c, 0x74, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x62, 0x2d,
	0x72, 0x6e, 0x69, 0x62, 0x2f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x62, 0x06, 0x70,
	0x72, 0x6f, 0x74, 0x6f, 0x33,
}

var (
	file_gnb_proto_rawDescOnce sync.Once
	file_gnb_proto_rawDescData = file_gnb_proto_rawDesc
)

func file_gnb_proto_rawDescGZIP() []byte {
	file_gnb_proto_rawDescOnce.Do(func() {
		file_gnb_proto_rawDescData = protoimpl.X.CompressGZIP(file_gnb_proto_rawDescData)
	})
	return file_gnb_proto_rawDescData
}

var file_gnb_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
var file_gnb_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
var file_gnb_proto_goTypes = []interface{}{
	(Nrscs)(0),                      // 0: entities.Nrscs
	(Ncnrb)(0),                      // 1: entities.Ncnrb
	(Nr_Mode)(0),                    // 2: entities.Nr.Mode
	(*Gnb)(nil),                     // 3: entities.Gnb
	(*ServedNRCell)(nil),            // 4: entities.ServedNRCell
	(*ServedNRCellInformation)(nil), // 5: entities.ServedNRCellInformation
	(*Nr)(nil),                      // 6: entities.Nr
	(*NrFrequencyInfo)(nil),         // 7: entities.NrFrequencyInfo
	(*FrequencyBandItem)(nil),       // 8: entities.FrequencyBandItem
	(*NrTransmissionBandwidth)(nil), // 9: entities.NrTransmissionBandwidth
	(*NrNeighbourInformation)(nil),  // 10: entities.NrNeighbourInformation
	(*ServedNRCellInformation_ChoiceNRMode)(nil),         // 11: entities.ServedNRCellInformation.ChoiceNRMode
	(*ServedNRCellInformation_ChoiceNRMode_FddInfo)(nil), // 12: entities.ServedNRCellInformation.ChoiceNRMode.FddInfo
	(*ServedNRCellInformation_ChoiceNRMode_TddInfo)(nil), // 13: entities.ServedNRCellInformation.ChoiceNRMode.TddInfo
	(*NrFrequencyInfo_SulInformation)(nil),               // 14: entities.NrFrequencyInfo.SulInformation
	(*NrNeighbourInformation_ChoiceNRMode)(nil),          // 15: entities.NrNeighbourInformation.ChoiceNRMode
	(*NrNeighbourInformation_ChoiceNRMode_FddInfo)(nil),  // 16: entities.NrNeighbourInformation.ChoiceNRMode.FddInfo
	(*NrNeighbourInformation_ChoiceNRMode_TddInfo)(nil),  // 17: entities.NrNeighbourInformation.ChoiceNRMode.TddInfo
	(*RanFunction)(nil),                                  // 18: entities.RanFunction
	(GnbType)(0),                                         // 19: entities.GnbType
	(*E2NodeComponentConfig)(nil),                        // 20: entities.E2nodeComponentConfig
	(*AdditionalCellInformation)(nil),                    // 21: entities.AdditionalCellInformation
}
var file_gnb_proto_depIdxs = []int32{
	4,  // 0: entities.Gnb.served_nr_cells:type_name -> entities.ServedNRCell
	18, // 1: entities.Gnb.ran_functions:type_name -> entities.RanFunction
	19, // 2: entities.Gnb.gnb_type:type_name -> entities.GnbType
	20, // 3: entities.Gnb.node_configs:type_name -> entities.E2nodeComponentConfig
	5,  // 4: entities.ServedNRCell.served_nr_cell_information:type_name -> entities.ServedNRCellInformation
	10, // 5: entities.ServedNRCell.nr_neighbour_infos:type_name -> entities.NrNeighbourInformation
	2,  // 6: entities.ServedNRCellInformation.nr_mode:type_name -> entities.Nr.Mode
	11, // 7: entities.ServedNRCellInformation.choice_nr_mode:type_name -> entities.ServedNRCellInformation.ChoiceNRMode
	21, // 8: entities.ServedNRCellInformation.additional_cell_information:type_name -> entities.AdditionalCellInformation
	14, // 9: entities.NrFrequencyInfo.sulInformation:type_name -> entities.NrFrequencyInfo.SulInformation
	8,  // 10: entities.NrFrequencyInfo.frequency_bands:type_name -> entities.FrequencyBandItem
	0,  // 11: entities.NrTransmissionBandwidth.nrscs:type_name -> entities.Nrscs
	1,  // 12: entities.NrTransmissionBandwidth.ncnrb:type_name -> entities.Ncnrb
	2,  // 13: entities.NrNeighbourInformation.nr_mode:type_name -> entities.Nr.Mode
	15, // 14: entities.NrNeighbourInformation.choice_nr_mode:type_name -> entities.NrNeighbourInformation.ChoiceNRMode
	12, // 15: entities.ServedNRCellInformation.ChoiceNRMode.fdd:type_name -> entities.ServedNRCellInformation.ChoiceNRMode.FddInfo
	13, // 16: entities.ServedNRCellInformation.ChoiceNRMode.tdd:type_name -> entities.ServedNRCellInformation.ChoiceNRMode.TddInfo
	7,  // 17: entities.ServedNRCellInformation.ChoiceNRMode.FddInfo.ul_freq_info:type_name -> entities.NrFrequencyInfo
	7,  // 18: entities.ServedNRCellInformation.ChoiceNRMode.FddInfo.dl_freq_info:type_name -> entities.NrFrequencyInfo
	9,  // 19: entities.ServedNRCellInformation.ChoiceNRMode.FddInfo.ul_transmission_bandwidth:type_name -> entities.NrTransmissionBandwidth
	9,  // 20: entities.ServedNRCellInformation.ChoiceNRMode.FddInfo.dl_transmission_bandwidth:type_name -> entities.NrTransmissionBandwidth
	7,  // 21: entities.ServedNRCellInformation.ChoiceNRMode.TddInfo.nr_freq_info:type_name -> entities.NrFrequencyInfo
	9,  // 22: entities.ServedNRCellInformation.ChoiceNRMode.TddInfo.transmission_bandwidth:type_name -> entities.NrTransmissionBandwidth
	9,  // 23: entities.NrFrequencyInfo.SulInformation.sul_transmission_bandwidth:type_name -> entities.NrTransmissionBandwidth
	16, // 24: entities.NrNeighbourInformation.ChoiceNRMode.fdd:type_name -> entities.NrNeighbourInformation.ChoiceNRMode.FddInfo
	17, // 25: entities.NrNeighbourInformation.ChoiceNRMode.tdd:type_name -> entities.NrNeighbourInformation.ChoiceNRMode.TddInfo
	7,  // 26: entities.NrNeighbourInformation.ChoiceNRMode.FddInfo.ular_fcn_freq_info:type_name -> entities.NrFrequencyInfo
	7,  // 27: entities.NrNeighbourInformation.ChoiceNRMode.FddInfo.dlar_fcn_freq_info:type_name -> entities.NrFrequencyInfo
	7,  // 28: entities.NrNeighbourInformation.ChoiceNRMode.TddInfo.ar_fcn_nr_freq_info:type_name -> entities.NrFrequencyInfo
	29, // [29:29] is the sub-list for method output_type
	29, // [29:29] is the sub-list for method input_type
	29, // [29:29] is the sub-list for extension type_name
	29, // [29:29] is the sub-list for extension extendee
	0,  // [0:29] is the sub-list for field type_name
}

func init() { file_gnb_proto_init() }
func file_gnb_proto_init() {
	if File_gnb_proto != nil {
		return
	}
	file_ran_function_proto_init()
	file_e2node_component_config_proto_init()
	file_additional_cell_information_proto_init()
	file_nb_types_proto_init()
	if !protoimpl.UnsafeEnabled {
		file_gnb_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
			switch v := v.(*Gnb); i {
			case 0:
				return &v.state
			case 1:
				return &v.sizeCache
			case 2:
				return &v.unknownFields
			default:
				return nil
			}
		}
		file_gnb_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
			switch v := v.(*ServedNRCell); i {
			case 0:
				return &v.state
			case 1:
				return &v.sizeCache
			case 2:
				return &v.unknownFields
			default:
				return nil
			}
		}
		file_gnb_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
			switch v := v.(*ServedNRCellInformation); i {
			case 0:
				return &v.state
			case 1:
				return &v.sizeCache
			case 2:
				return &v.unknownFields
			default:
				return nil
			}
		}
		file_gnb_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
			switch v := v.(*Nr); i {
			case 0:
				return &v.state
			case 1:
				return &v.sizeCache
			case 2:
				return &v.unknownFields
			default:
				return nil
			}
		}
		file_gnb_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
			switch v := v.(*NrFrequencyInfo); i {
			case 0:
				return &v.state
			case 1:
				return &v.sizeCache
			case 2:
				return &v.unknownFields
			default:
				return nil
			}
		}
		file_gnb_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
			switch v := v.(*FrequencyBandItem); i {
			case 0:
				return &v.state
			case 1:
				return &v.sizeCache
			case 2:
				return &v.unknownFields
			default:
				return nil
			}
		}
		file_gnb_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
			switch v := v.(*NrTransmissionBandwidth); i {
			case 0:
				return &v.state
			case 1:
				return &v.sizeCache
			case 2:
				return &v.unknownFields
			default:
				return nil
			}
		}
		file_gnb_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
			switch v := v.(*NrNeighbourInformation); i {
			case 0:
				return &v.state
			case 1:
				return &v.sizeCache
			case 2:
				return &v.unknownFields
			default:
				return nil
			}
		}
		file_gnb_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
			switch v := v.(*ServedNRCellInformation_ChoiceNRMode); i {
			case 0:
				return &v.state
			case 1:
				return &v.sizeCache
			case 2:
				return &v.unknownFields
			default:
				return nil
			}
		}
		file_gnb_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
			switch v := v.(*ServedNRCellInformation_ChoiceNRMode_FddInfo); i {
			case 0:
				return &v.state
			case 1:
				return &v.sizeCache
			case 2:
				return &v.unknownFields
			default:
				return nil
			}
		}
		file_gnb_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
			switch v := v.(*ServedNRCellInformation_ChoiceNRMode_TddInfo); i {
			case 0:
				return &v.state
			case 1:
				return &v.sizeCache
			case 2:
				return &v.unknownFields
			default:
				return nil
			}
		}
		file_gnb_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
			switch v := v.(*NrFrequencyInfo_SulInformation); i {
			case 0:
				return &v.state
			case 1:
				return &v.sizeCache
			case 2:
				return &v.unknownFields
			default:
				return nil
			}
		}
		file_gnb_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
			switch v := v.(*NrNeighbourInformation_ChoiceNRMode); i {
			case 0:
				return &v.state
			case 1:
				return &v.sizeCache
			case 2:
				return &v.unknownFields
			default:
				return nil
			}
		}
		file_gnb_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
			switch v := v.(*NrNeighbourInformation_ChoiceNRMode_FddInfo); i {
			case 0:
				return &v.state
			case 1:
				return &v.sizeCache
			case 2:
				return &v.unknownFields
			default:
				return nil
			}
		}
		file_gnb_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
			switch v := v.(*NrNeighbourInformation_ChoiceNRMode_TddInfo); i {
			case 0:
				return &v.state
			case 1:
				return &v.sizeCache
			case 2:
				return &v.unknownFields
			default:
				return nil
			}
		}
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: file_gnb_proto_rawDesc,
			NumEnums:      3,
			NumMessages:   15,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_gnb_proto_goTypes,
		DependencyIndexes: file_gnb_proto_depIdxs,
		EnumInfos:         file_gnb_proto_enumTypes,
		MessageInfos:      file_gnb_proto_msgTypes,
	}.Build()
	File_gnb_proto = out.File
	file_gnb_proto_rawDesc = nil
	file_gnb_proto_goTypes = nil
	file_gnb_proto_depIdxs = nil
}
