/*
 *
 * Copyright 2019 AT&T Intellectual Property
 *
 * 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.
 *
 */


/*
 * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
 * From ASN.1 module "X2AP-PDU-Contents"
 * 	found in "../../asnFiles/X2AP-PDU-Contents.asn"
 * 	`asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
 */

#ifndef	_E_RABs_ToBeModified_SgNBModReqd_Item_SgNBPDCPpresent_H_
#define	_E_RABs_ToBeModified_SgNBModReqd_Item_SgNBPDCPpresent_H_


#include "asn_application.h"

/* Including external dependencies */
#include "constr_SEQUENCE.h"

#ifdef __cplusplus
extern "C" {
#endif

/* Forward declarations */
struct E_RAB_Level_QoS_Parameters;
struct ULConfiguration;
struct GTPtunnelEndpoint;
struct ProtocolExtensionContainer;

/* E-RABs-ToBeModified-SgNBModReqd-Item-SgNBPDCPpresent */
typedef struct E_RABs_ToBeModified_SgNBModReqd_Item_SgNBPDCPpresent {
	struct E_RAB_Level_QoS_Parameters	*requested_MCG_E_RAB_Level_QoS_Parameters;	/* OPTIONAL */
	struct ULConfiguration	*uL_Configuration;	/* OPTIONAL */
	struct GTPtunnelEndpoint	*sgNB_UL_GTP_TEIDatPDCP;	/* OPTIONAL */
	struct GTPtunnelEndpoint	*s1_DL_GTP_TEIDatSgNB;	/* OPTIONAL */
	struct ProtocolExtensionContainer	*iE_Extensions;	/* OPTIONAL */
	/*
	 * This type is extensible,
	 * possible extensions are below.
	 */
	
	/* Context for parsing across buffer boundaries */
	asn_struct_ctx_t _asn_ctx;
} E_RABs_ToBeModified_SgNBModReqd_Item_SgNBPDCPpresent_t;

/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_E_RABs_ToBeModified_SgNBModReqd_Item_SgNBPDCPpresent;
extern asn_SEQUENCE_specifics_t asn_SPC_E_RABs_ToBeModified_SgNBModReqd_Item_SgNBPDCPpresent_specs_1;
extern asn_TYPE_member_t asn_MBR_E_RABs_ToBeModified_SgNBModReqd_Item_SgNBPDCPpresent_1[5];

#ifdef __cplusplus
}
#endif

#endif	/* _E_RABs_ToBeModified_SgNBModReqd_Item_SgNBPDCPpresent_H_ */
#include "asn_internal.h"
