/*
info:
  description: 'The ETSI MEC ISG MEC012 RNI API described using Protocol Buffer'
  version: '1.1.1'
  title: 'RNI API, Protobuf'
externalDocs: 
  description: ETSI GS MEC012 Radio Network Information API, V1.1.1
  url: 'http://www.etsi.org/deliver/etsi_gs/MEC/001_099/012/01.01.01_60/gs_mec012v010101p.pdf'
*/

/* START PROTO DEFINITION*/
syntax = "proto3";

message LinkType
{
	string href = 1;
}
message TimeStamp
{
	uint32 seconds = 1;
	uint32 nanoSeconds = 2;
}
message AssociateId
{
	enum Type
	{
		RESERVED = 0;
		UE_IPV4_ADDRESS = 1;
		UE_IPV6_ADDRESS = 2;
		NATED_IP_ADDRESS = 3;
		GTP_TEID = 4;
	}
	Type type = 1;
	string value = 2;
}
message PlmnInfo
{
	message Ecgi
	{
		string mcc = 1;
		string mnc = 2;
		string cellId = 3;
	}
	TimeStamp timeStamp = 1;
	string appInsId = 2;
	repeated Ecgi ecgi =3;
}
message RabInfo
{
	message CellUserInfo
	{
		Ecgi ecgi = 1;
		repeated UeInfo ueInfo = 2;
	}
	message Ecgi
	{
		string mcc = 1;
		string mnc = 2;
		string cellId = 3;
	}
	message UeInfo
	{
		repeated AssociateId associatedId = 1;
		repeated ErabInfo erabInfo = 2;
	}
	message ErabInfo
	{
		uint32 erabId = 1;
		ErabQosParameters erabQosParameters = 2;
	}
	message ErabQosParameters
	{
		uint32 qci = 1;
		QosInformation qosInfo = 2;
	}
	message QosInformation
	{
		uint32 erabMbrDl = 1;
		uint32 erabMbrUl = 2;
		uint32 erabGbrDl = 3;
		uint32 erabGbrUl = 4;
	}
	TimeStamp timeStamp = 1;
	string appInsId = 2;
	string requestId =3;
	repeated CellUserInfo cellUsers = 4;
}
message S1BearerInfo
{
	message TempUeId
	{
		string mmec = 1;
		string mtmsi = 2;
	}
	message Ecgi
	{
		string mcc = 1;
		string mnc = 2;
		string cellId = 3;
	}
	message EnbInfo
	{
		string ipAddress = 1;
		string tunnelId = 2;
	}
	message SGwInfo
	{
		string ipAddress = 1;
		string tunnelId = 2;
	}
	message S1BearerInfoDetailed
	{
		uint32 erabId = 1;
		EnbInfo enbInfo = 2;
		SGwInfo sGwInfo = 3;
	}
	message S1UeInfo
	{
		TempUeId tempUeId = 1;
		repeated AssociateId associateId = 2;
		repeated Ecgi ecgi = 3; 
		repeated S1BearerInfoDetailed s1BearerInfoDetailed = 4;
	}
	TimeStamp timeStamp = 1;
	repeated S1UeInfo s1UeInfo = 2;
}
message CellChangeSubscription
{
	message Plmn
	{
		string mcc = 1;
		string mnc = 2;
	}
	message FilterCriteriaAssocHo
	{
		enum HoStatus
		{
			RESERVED = 0;
			IN_PREPARATION = 1;
			IN_EXECUTION = 2;
			COMPLETED = 3;
			REJECTED = 4;
			CANCELLED = 5;
		}
		string appInsId = 1;
		repeated AssociateId associateId = 2;
		Plmn plmn = 3;
		repeated string cellId = 4;
		repeated HoStatus hoStatus = 5;
	}
	message ExpiryDeadline
	{
		uint32 seconds = 1;
		uint32	nanoSeconds = 2;
	}
	string subscriptionType = 1;
	string callbackUri = 2;
	
	FilterCriteriaAssocHo filterCriteriaAssocHo = 3;
	TimeStamp expiryDeadline = 4;
}
message RabEstSubscription
{
	message Plmn
	{
		string mcc = 1;
		string mnc = 2;
	}
	message FilterCriteriaQci
	{
		string appInsId = 1;
		Plmn plmn = 2;
		repeated string cellId = 3;
		uint32 qci = 4;
	}
	message ExpiryDeadline
	{
		uint32 seconds = 1;
		uint32	nanoSeconds = 2;
	}
	string subscriptionType = 1;
	string callbackUri = 2;
	
	FilterCriteriaQci filterCriteriaQci = 3;
	TimeStamp expiryDeadline = 4;
}
message RabModSubscription
{
	message Plmn
	{
		string mcc = 1;
		string mnc = 2;
	}
	message FilterCriteriaQci
	{
		string appInsId = 1;
		Plmn plmn = 2;
		repeated string cellId = 3;
		uint32 qci = 4;
	}
	message ExpiryDeadline
	{
		uint32 seconds = 1;
		uint32	nanoSeconds = 2;
	}
	string subscriptionType = 1;
	string callbackUri = 2;
	FilterCriteriaQci filterCriteriaQci = 3;
	TimeStamp expiryDeadline = 4;
}
message RabRelSubscription
{
	message Plmn
	{
		string mcc = 1;
		string mnc = 2;
	}
	message FilterCriteriaQci
	{
		string appInsId = 1;
		Plmn plmn = 2;
		repeated string cellId = 3;
		uint32 qci = 4;
	}
	message ExpiryDeadline
	{
		uint32 seconds = 1;
		uint32 nanoSeconds = 2;
	}
	string subscriptionType = 1;
	string callbackUri = 2;
	
	FilterCriteriaQci filterCriteriaQci = 3;
	TimeStamp expiryDeadline = 4;
}
message MeasRepUeSubscription
{
	message Plmn
	{
		string mcc = 1;
		string mnc = 2;
	}
	message FilterCriteriaAssocTri
	{
		enum Trigger 
		{
			RESERVED = 0;
			PERIODICAL_REPORT_STRONGEST_CELLS = 1;
			PERIODICAL_REPORT_STRONGEST_CELLS_FOR_SON = 2;
			PERIODICAL_REPORT_CGI = 3;
			EVENT_A1 = 10;
			EVENT_A2 = 11;
			EVENT_A3 = 12;
			EVENT_A4 = 13;
			EVENT_A5 = 14;
			EVENT_A6 = 15;
			EVENT_B1 = 20;
			EVENT_B2 = 21;
			EVENT_C1 = 30;
			EVENT_C2 = 31;
			EVENT_W1 = 40;
			EVENT_W2 = 41;
			EVENT_W3 = 42;
		}
		string appInsId = 1;
		repeated AssociateId associateId = 2;
		Plmn plmn = 3;
		repeated string cellId = 4;
		repeated Trigger trigger = 5;
	}
	string subscriptionType = 1;
	string callbackUri = 2;
	FilterCriteriaAssocTri filterCriteriaAssocTri = 3;
	TimeStamp expiryDeadline = 4;
}
message MeasTaSubscription
{
	message Plmn
	{
		string mcc = 1;
		string mnc = 2;
	}
	message FilterCriteriaAssoc
	{
		string appInsId = 1;
		repeated AssociateId associateId = 2;
		Plmn plmn = 3;
		repeated string cellId = 4;
	}
	string subscriptionType = 1;
	string callbackUri = 2;
	
	FilterCriteriaAssoc filterCriteriaAssoc = 3;
	TimeStamp expiryDeadline = 4;
}
message CaReconfSubscription
{
	message Plmn
	{
		string mcc = 1;
		string mnc = 2;
	}
	message FilterCriteriaAssoc
	{
		string appInsId = 1;
		repeated AssociateId associateId = 2;
		Plmn plmn = 3;
		repeated string cellId = 4;
	}
	string subscriptionType = 1;
	string callbackUri = 2;
	
	FilterCriteriaAssoc filterCriteriaAssoc = 3;
	TimeStamp expiryDeadline = 4;
}
message S1BearerSubscription
{
	enum EventType 
	{
		RESERVED = 0;
		S1_BEARER_ESTABLISH = 1;
		S1_BEARER_MODIFY = 2;
		S1_BEARER_RELEASE = 3;
	}
	message Plmn
	{
		string mcc = 1;
		string mnc = 2;
	}
	message S1BearerSubscriptionCriteria
	{
		repeated AssociateId associateId = 1;
		Plmn plmn = 2;
		repeated string cellId = 3;
		repeated uint32 erabId = 4;
	}
	string subscriptionType = 1;
	string callbackUri = 2;
	repeated EventType eventType = 3; 
	S1BearerSubscriptionCriteria s1BearerSubscriptionCriteria = 4;
	TimeStamp expiryDeadline = 5;
}
message SubscriptionLinkList
{
	enum SubscriptionType
		{
			RESERVED = 0;
			CELL_CHANGE = 1;
			RAB_ESTABLISHMENT = 2;
			RAB_MODIFICATION = 3;
			RAB_RELEASE = 4;
			MEAS_REPORT_UE = 5;
			MEAS_TIMING_ADVANCE = 6;
			CA_RECONF = 7;
			S1_BEARER = 8;
		}
	message Subscription
	{
		string href = 1;
		SubscriptionType subscriptionType = 2;
	}
	message Links
	{
		LinkType self = 1;
		repeated Subscription subscription = 2;
	}
	Links _links = 1;
}
message CellChangeNotification
{
	enum HoStatus
	{
		RESERVED = 0;
		IN_PREPARATION = 1;
		IN_EXECUTION = 2;
		COMPLETED = 3;
		REJECTED = 4;
		CANCELLED = 5;
	}
	message Ecgi
	{
		string mcc = 1;
		string mnc = 2;
		string cellId = 3;
	}
	message TempUeId
	{
		string mmec = 1;
		string mtmsi = 2;
	}
	TimeStamp timeStamp = 1;
	repeated AssociateId associateId = 2;
	Ecgi srcEcgi = 3;
	Ecgi trgEcgi = 4;
	HoStatus hoStatus = 5;
	TempUeId tempUeId = 6;
} 
message RabEstNotification
{
	message Ecgi
	{
		string mcc = 1;
		string mnc = 2;
		string cellId =3;
	}
	message QosInformation
	{
		uint32 erabMbrDl = 1;
		uint32 erabMbrUl = 2;
		uint32 erabGbrDl = 3;
		uint32 erabGbrUl = 4;
	}
	message ErabQosParameters
	{
		uint32 qci= 1;
		QosInformation qosInformation = 2;
	}
	message TempUeId
	{
		string mmec = 1;
		string mtmsi = 2;
	}
	TimeStamp timeStamp = 1;
	Ecgi ecgi = 2;
	repeated AssociateId associateId = 3;
	uint32 erabId = 4;
	ErabQosParameters erabQosParameters = 5;
	TempUeId tempUeId = 6;
} 
message RabModNotification
{
	message Ecgi
	{
		string mcc = 1;
		string mnc = 2;
		string cellId =3;
	}
	message QosInformation
	{
		uint32 erabMbrDl = 1;
		uint32 erabMbrUl = 2;
		uint32 erabGbrDl = 3;
		uint32 erabGbrUl = 4;
	}
	message ErabQosParameters
	{
		uint32 qci= 1;
		QosInformation qosInformation = 2;
	}
	TimeStamp timeStamp = 1;
	Ecgi ecgi = 2;
	repeated AssociateId associateId = 3;
	uint32 erabId = 4;
	ErabQosParameters erabQosParameters = 5;
} 
message RabRelNotification
{
	message Ecgi
	{
		string mcc = 1;
		string mnc = 2;
		string cellId =3;
	}
	message ErabReleaseInfo
	{
		uint32 erabId = 1;
	}
	TimeStamp timeStamp = 1;
	Ecgi ecgi = 2;
	repeated AssociateId associateId = 3;
	ErabReleaseInfo erabReleaseInfo = 4;
} 
message MeasRepUeNotification
{
	enum Trigger 
	{
		NOT_AVAILABLE = 0;
		PERIODICAL_REPORT_STRONGEST_CELLS = 1;
		PERIODICAL_REPORT_STRONGEST_CELLS_FOR_SON = 2;
		PERIODICAL_REPORT_CGI = 3;
		EVENT_A1 = 10;
		EVENT_A2 = 11;
		EVENT_A3 = 12;
		EVENT_A4 = 13;
		EVENT_A5 = 14;
		EVENT_A6 = 15;
		EVENT_B1 = 20;
		EVENT_B2 = 21;
		EVENT_C1 = 30;
		EVENT_C2 = 31;
		EVENT_W1 = 40;
		EVENT_W2 = 41;
		EVENT_W3 = 42;
	}
	message Ecgi
	{
		string mcc = 1;
		string mnc = 2;
		string cellId =3;
	}
	message EutranNeighborCellMeasInfo
	{
		Ecgi ecgi = 1;
		uint32 rsrp = 2;
		uint32 rsrq = 3;	
	}
	message CarrierAggregationMeasInfo
	{
		string cellIdSrv = 1;
		uint32 rsrpSrv = 2;
		uint32 rsrqSrv = 3;
		string cellIdNei = 4;
		uint32 rsrpNei = 5;
		uint32 rsrqNei = 6;
	}
	TimeStamp timeStamp = 1;
	Ecgi ecgi = 2;
	repeated AssociateId associateId = 3;
	uint32 rsrp = 4;
	uint32 rsrq = 5;
	Trigger trigger = 6;
	repeated EutranNeighborCellMeasInfo eutranNeighborCellMeasInfo = 7;
	repeated CarrierAggregationMeasInfo carrierAggrMeasInfo = 8;
} 
message MeasTaNotification
{
	message Ecgi
	{
		string mcc = 1;
		string mnc = 2;
		string cellId =3;
	}
	TimeStamp timeStamp = 1;
	Ecgi ecgi = 2;
	repeated AssociateId associateId = 3;
	uint32	timingAdvance = 4;
}
message CaReConfNotification
{
	message Ecgi
	{
		string mcc = 1;
		string mnc = 2;
		string cellId =3;
	}
	message SecondaryCellAdd
	{
		Ecgi ecgi = 1;
	}
	message SecondaryCellRemove
	{
		Ecgi ecgi = 1;
	}
	message CarrierAggregationMeasInfo
	{
		string cellIdSrv = 1;
		uint32 rsrpSrv = 2;
		uint32 rsrqSrv = 3;
		string cellIdNei = 4;
		uint32 rsrpNei = 5;
		uint32 rsrqNei = 6;
	}
	TimeStamp timeStamp = 1;
	Ecgi ecgi = 2;
	repeated AssociateId associateId = 3;
	repeated SecondaryCellAdd secCellAdd = 4;
	repeated SecondaryCellRemove secCellRem = 5;
	repeated CarrierAggregationMeasInfo carrAggrMeasInfo = 6;
} 
message ExpiryNotification
{
	message Links
	{
		string self = 1;
	}
	TimeStamp timeStamp = 1;
	Links _links = 2;
	TimeStamp expiryDeadline = 3;
}
message S1BearerNotification
{
	enum S1EventType 
	{
		RESERVED = 0;
		S1_BEARER_ESTABLISH = 1;
		S1_BEARER_MODIFY = 2;
		S1_BEARER_RELEASE = 3;
	}
	message TempUeId
	{
		string mmec = 1;
		string mtmsi = 2;
	}
	message Ecgi
	{
		string mcc = 1;
		string mnc = 2;
		string cellId = 3;
	}
	message EnbInfo
	{
		string ipAddress = 1;
		string tunnelId = 2;
	}
	message SGwInfo
	{
		string ipAddress = 1;
		string tunnelId = 2;
	}
	message S1BearerInfo
	{
		uint32 erabId = 1;
		EnbInfo enbInfo = 2;
		SGwInfo sGwInfo = 3;
	}
	message S1UeInfo
	{
		TempUeId tempUeId = 1;
		AssociateId associateId = 2;
		repeated Ecgi ecgi = 3;
		repeated S1BearerInfo s1BearerInfo = 4;
	}
	TimeStamp timeStamp = 1;
	S1EventType s1Event = 2;
	S1UeInfo s1UeInfo = 3;
}