/*******************************************************************************
* Copyright (c) 2000-2021 Ericsson Telecom AB
*
* XSD to TTCN-3 Translator
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
*
* Contributors:
*   Balasko, Jeno
*   Lovassy, Arpad
*   Raduly, Csaba
*   Szabo, Bence Janos
*
******************************************************************************/
//
//  File:          uri_etsi_org_ngn_params_xml_simservs_sci.ttcn
//  Description:
//  References:
//  Rev:
//  Prodnr:
//  Updated:
//  Contact:       http://ttcn.ericsson.se
//
////////////////////////////////////////////////////////////////////////////////
//	Generated from file(s):
//	- SIP.xsd
//			/* xml version = "1.0" encoding = "UTF-8" */
//			/* targetnamespace = "http://uri.etsi.org/ngn/params/xml/simservs/sci" */
////////////////////////////////////////////////////////////////////////////////
//     Modification header(s):
//-----------------------------------------------------------------------------
//  Modified by:
//  Modification date:
//  Description:
//  Modification contact:
//------------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////


module uri_etsi_org_ngn_params_xml_simservs_sci_e {


import from XSD all;


/* XML Schema Definition for the AOC information */


/* Definition of simple types */


/* The boolean datatype value "true" maps to bit value "1" and the value "false" to bit value "0" */
type XSD.Boolean BitType
with {
  variant "name as uncapitalized";
  //variant "text 'true' as '1'";
  //variant "text 'false' as '0'";
};


type XSD.HexBinary EightBitType length(1);


type XSD.HexBinary SixteenBitType length(2);


/* Following structure of the networkIdentification value may be used: */


/* {itu-t (0) administration (2) <national regulation authority> (x) network (y) node identification (z)} */


/* The value for x is the value of the national regulation authority, the value for y is under the control */


/* of the national regulation authority concerned, the value for z is under the control of the network concerned. */


type XSD.String NetworkIdentificationType (pattern "02[0-9A-F]+");


/* The currency shall be coded according to ISO 4217 */
type XSD.String CurrencyType length(3);


type XSD.Integer CurrencyFactorType (0 .. 999999);


type XSD.Integer CurrencyScaleType (-7 .. 3);


type XSD.Integer TariffDurationType (0 .. 36000);


/* Definition of complex types */


type record TariffSwitchPulseType
{
	TariffPulseFormatType nextTariffPulse,
	EightBitType tariffSwitchOverTime
};


/* the choice type shall be replaced with sequence according to ASN.1 in ES 201 296 V1.3.1 */
type record CommunicationChargePulseType
{
	EightBitType pulseUnits,
	SixteenBitType chargeUnitTimeInterval,
	TariffDurationType tariffDuration
};


type record TariffPulseFormatType
{
	record length(1 .. 4) of CommunicationChargePulseType communicationChargeSequencePulse_list,
	BitType tariffControlIndicators,
	EightBitType callAttemptChargePulse,
	EightBitType callSetupChargePulse
}
with {
  variant (communicationChargeSequencePulse_list) "untagged";
  variant (communicationChargeSequencePulse_list[-]) "name as 'communicationChargeSequencePulse'";
};


type record CommunicationChargeCurrencyType
{
	CurrencyFactorScaleType currencyFactorScale,
	TariffDurationType tariffDuration,
	BitType subTariffControl
};


type record TariffSwitchCurrencyType
{
	TariffCurrencyFormatType nextTariffCurrency,
	EightBitType tariffSwitchOverTime
};


type record TariffCurrencyFormatType
{
	record length(1 .. 4) of CommunicationChargeCurrencyType communicationChargeSequenceCurrency_list,
	BitType tariffControlIndicators,
	CurrencyFactorScaleType callAttemptChargeCurrency,
	CurrencyFactorScaleType callSetupChargeCurrency
}
with {
  variant (communicationChargeSequenceCurrency_list) "untagged";
  variant (communicationChargeSequenceCurrency_list[-]) "name as 'communicationChargeSequenceCurrency'";
};


type record CurrencyFactorScaleType
{
	CurrencyFactorType currencyFactor,
	CurrencyScaleType currencyScale
};


type record TariffPulseType
{
	TariffPulseFormatType currentTariffPulse,
	TariffSwitchPulseType tariffSwitchPulse
};


type record TariffCurrencyType
{
	TariffCurrencyFormatType currentTariffCurrency,
	TariffSwitchCurrencyType tariffSwitchCurrency
};


/* the choice type shall be replaced with sequence according to ASN.1 in ES 201 296 V1.3.1 */
type record ChargingControlIndicatorsType
{
	BitType immediateChangeOfActuallyAppliedTariff,
	BitType delayUntilStart
};


type record ChargingReferenceIdentificationType
{
	NetworkIdentificationType networkIdentification,
	XSD.NonNegativeInteger referenceID
};


type record ChargingTariffInformationType
{
	ChargingControlIndicatorsType chargingControlIndicators,
	record {
		union {
			TariffCurrencyType tariffCurrency,
			TariffPulseType tariffPulse
		} choice
	} chargingTariff,
	ChargingReferenceIdentificationType originationIdentification,
	ChargingReferenceIdentificationType destinationIdentification optional,
	CurrencyType currency
}
with {
  variant (chargingTariff.choice) "untagged";
};


type record AddOnChargingInformationType
{
	ChargingControlIndicatorsType chargingControlIndicators,
	record {
		union {
			CurrencyFactorScaleType addOnChargeCurrency,
			EightBitType addOnChargePulse
		} choice
	} addOnCharge,
	ChargingReferenceIdentificationType originationIdentification,
	ChargingReferenceIdentificationType destinationIdentification optional,
	CurrencyType currency
}
with {
  variant (addOnCharge.choice) "untagged";
};


/* Definition of document structure */


type record MessageType
{
	union {
		ChargingTariffInformationType crgt,
		AddOnChargingInformationType aocrg
	} choice
}
with {
  variant "name as uncapitalized";
  variant "element";
  variant (choice) "untagged";
};


}
with {
  encode "XML";
  variant "namespace as 'http://uri.etsi.org/ngn/params/xml/simservs/sci' prefix 'sci'";
  variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'";
  variant "elementFormQualified";
}
