-- 3GPP TS 38.413 V17.5.0 (2023-06)
-- 9.4.8	Container Definitions
-- **************************************************************
--
-- Container definitions
--
-- **************************************************************

NGAP-Containers {
itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
ngran-Access (22) modules (3) ngap (1) version1 (1) ngap-Containers (5) }

DEFINITIONS AUTOMATIC TAGS ::=

BEGIN

-- **************************************************************
--
-- IE parameter types from other modules.
--
-- **************************************************************

IMPORTS

	Criticality,
	Presence,
	PrivateIE-ID,
	ProtocolExtensionID,
	ProtocolIE-ID
FROM NGAP-CommonDataTypes

	maxPrivateIEs,
	maxProtocolExtensions,
	maxProtocolIEs
FROM NGAP-Constants;

-- **************************************************************
--
-- Class Definition for Protocol IEs
--
-- **************************************************************

NGAP-PROTOCOL-IES ::= CLASS {
	&id				ProtocolIE-ID					UNIQUE,
	&criticality	Criticality,
	&Value,
	&presence		Presence
}
WITH SYNTAX {
	ID				&id
	CRITICALITY		&criticality
	TYPE			&Value
	PRESENCE		&presence
}

-- **************************************************************
--
-- Class Definition for Protocol IEs
--
-- **************************************************************

NGAP-PROTOCOL-IES-PAIR ::= CLASS {
	&id					ProtocolIE-ID				UNIQUE,
	&firstCriticality	Criticality,
	&FirstValue,
	&secondCriticality	Criticality,
	&SecondValue,
	&presence			Presence
}
WITH SYNTAX {
	ID						&id
	FIRST CRITICALITY		&firstCriticality
	FIRST TYPE				&FirstValue
	SECOND CRITICALITY		&secondCriticality
	SECOND TYPE				&SecondValue
	PRESENCE				&presence
}

-- **************************************************************
--
-- Class Definition for Protocol Extensions
--
-- **************************************************************

NGAP-PROTOCOL-EXTENSION ::= CLASS {
	&id				ProtocolExtensionID			UNIQUE,
	&criticality	Criticality,
	&Extension,
	&presence		Presence
}
WITH SYNTAX {
	ID				&id
	CRITICALITY		&criticality
	EXTENSION		&Extension
	PRESENCE		&presence
}

-- **************************************************************
--
-- Class Definition for Private IEs
--
-- **************************************************************

NGAP-PRIVATE-IES ::= CLASS {
	&id				PrivateIE-ID,
	&criticality	Criticality,
	&Value,
	&presence		Presence
}
WITH SYNTAX {
	ID				&id
	CRITICALITY		&criticality
	TYPE			&Value
	PRESENCE		&presence
}

-- **************************************************************
--
-- Container for Protocol IEs
--
-- **************************************************************

ProtocolIE-Container {NGAP-PROTOCOL-IES : IEsSetParam} ::=
	SEQUENCE (SIZE (0..maxProtocolIEs)) OF
	ProtocolIE-Field {{IEsSetParam}}

ProtocolIE-SingleContainer {NGAP-PROTOCOL-IES : IEsSetParam} ::=
	ProtocolIE-Field {{IEsSetParam}}

ProtocolIE-Field {NGAP-PROTOCOL-IES : IEsSetParam} ::= SEQUENCE {
	id				NGAP-PROTOCOL-IES.&id				({IEsSetParam}),
	criticality		NGAP-PROTOCOL-IES.&criticality		({IEsSetParam}{@id}),
	value			NGAP-PROTOCOL-IES.&Value			({IEsSetParam}{@id})
}

-- **************************************************************
--
-- Container for Protocol IE Pairs
--
-- **************************************************************

ProtocolIE-ContainerPair {NGAP-PROTOCOL-IES-PAIR : IEsSetParam} ::=
	SEQUENCE (SIZE (0..maxProtocolIEs)) OF
	ProtocolIE-FieldPair {{IEsSetParam}}

ProtocolIE-FieldPair {NGAP-PROTOCOL-IES-PAIR : IEsSetParam} ::= SEQUENCE {
	id					NGAP-PROTOCOL-IES-PAIR.&id					({IEsSetParam}),
	firstCriticality	NGAP-PROTOCOL-IES-PAIR.&firstCriticality	({IEsSetParam}{@id}),
	firstValue			NGAP-PROTOCOL-IES-PAIR.&FirstValue			({IEsSetParam}{@id}),
	secondCriticality	NGAP-PROTOCOL-IES-PAIR.&secondCriticality	({IEsSetParam}{@id}),
	secondValue			NGAP-PROTOCOL-IES-PAIR.&SecondValue			({IEsSetParam}{@id})
}

-- **************************************************************
--
-- Container Lists for Protocol IE Containers
--
-- **************************************************************

ProtocolIE-ContainerList {INTEGER : lowerBound, INTEGER : upperBound, NGAP-PROTOCOL-IES : IEsSetParam} ::=
	SEQUENCE (SIZE (lowerBound..upperBound)) OF
	ProtocolIE-SingleContainer {{IEsSetParam}}

ProtocolIE-ContainerPairList {INTEGER : lowerBound, INTEGER : upperBound, NGAP-PROTOCOL-IES-PAIR : IEsSetParam} ::=
	SEQUENCE (SIZE (lowerBound..upperBound)) OF
	ProtocolIE-ContainerPair {{IEsSetParam}}

-- **************************************************************
--
-- Container for Protocol Extensions
--
-- **************************************************************

ProtocolExtensionContainer {NGAP-PROTOCOL-EXTENSION : ExtensionSetParam} ::=
	SEQUENCE (SIZE (1..maxProtocolExtensions)) OF
	ProtocolExtensionField {{ExtensionSetParam}}

ProtocolExtensionField {NGAP-PROTOCOL-EXTENSION : ExtensionSetParam} ::= SEQUENCE {
	id					NGAP-PROTOCOL-EXTENSION.&id				({ExtensionSetParam}),
	criticality			NGAP-PROTOCOL-EXTENSION.&criticality	({ExtensionSetParam}{@id}),
	extensionValue		NGAP-PROTOCOL-EXTENSION.&Extension		({ExtensionSetParam}{@id})
}

-- **************************************************************
--
-- Container for Private IEs
--
-- **************************************************************

PrivateIE-Container {NGAP-PRIVATE-IES : IEsSetParam } ::=
	SEQUENCE (SIZE (1..maxPrivateIEs)) OF
	PrivateIE-Field {{IEsSetParam}}

PrivateIE-Field {NGAP-PRIVATE-IES : IEsSetParam} ::= SEQUENCE {
	id					NGAP-PRIVATE-IES.&id				({IEsSetParam}),
	criticality			NGAP-PRIVATE-IES.&criticality		({IEsSetParam}{@id}),
	value				NGAP-PRIVATE-IES.&Value				({IEsSetParam}{@id})
}

END
