/*
 * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
 * From ASN.1 module "E2AP-PDU-Contents"
 * 	found in "Spec/e2_and_x2-combined-and-minimized.asn1"
 * 	`asn1c -pdu=auto -fincludes-quoted -fcompound-names -fno-include-deps -gen-PER -no-gen-OER -no-gen-example`
 */

#include "RICsubscriptionDeleteRequest.h"

asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteRequest_1[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteRequest, protocolIEs),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ProtocolIE_Container_8807P3,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"protocolIEs"
		},
};
static const ber_tlv_tag_t asn_DEF_RICsubscriptionDeleteRequest_tags_1[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionDeleteRequest_tag2el_1[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */
};
asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDeleteRequest_specs_1 = {
	sizeof(struct RICsubscriptionDeleteRequest),
	offsetof(struct RICsubscriptionDeleteRequest, _asn_ctx),
	asn_MAP_RICsubscriptionDeleteRequest_tag2el_1,
	1,	/* Count of tags in the map */
	0, 0, 0,	/* Optional elements (not needed) */
	1,	/* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDeleteRequest = {
	"RICsubscriptionDeleteRequest",
	"RICsubscriptionDeleteRequest",
	&asn_OP_SEQUENCE,
	asn_DEF_RICsubscriptionDeleteRequest_tags_1,
	sizeof(asn_DEF_RICsubscriptionDeleteRequest_tags_1)
		/sizeof(asn_DEF_RICsubscriptionDeleteRequest_tags_1[0]), /* 1 */
	asn_DEF_RICsubscriptionDeleteRequest_tags_1,	/* Same as above */
	sizeof(asn_DEF_RICsubscriptionDeleteRequest_tags_1)
		/sizeof(asn_DEF_RICsubscriptionDeleteRequest_tags_1[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_RICsubscriptionDeleteRequest_1,
	1,	/* Elements count */
	&asn_SPC_RICsubscriptionDeleteRequest_specs_1	/* Additional specs */
};

