AppLCM_TypesAndValues.ttcn 2.86 KB
Newer Older
Elian Kraja's avatar
Elian Kraja committed
module AppLCM_TypesAndValues {

// JSON
import from JSON all;

// LibCommon
import from LibCommon_BasicTypesAndValues all;


type enumerated InstantiationState {
  NOT_INSTANTIATED,
  INSTANTIATED
}


type enumerated TerminationType {
  FORCEFUL,
  GRACEFUL
}

type enumerated TerminationTypeWithError {
  FORCE,
  GRACE
}


type enumerated OperationType {
  STARTED,
  STOPPED
}

type enumerated OperationTypeWithError {
  START,
  STOP
}


type enumerated SubscriptionType {
  AppInstanceStateChangeSubscription,
  AppLcmOpOccStateChangeSubscription
}


type enumerated NotificationType {
  AppInstNotification,
  AppLcmOpOccNotification
}

type record CreateAppInstanceRequest {
  String appDId 
}


type record CreateAppInstanceRequestWithError {
  String appDIdWithError
}

type record of AppInstanceInfo AppInstanceInfoList;
type record AppInstanceInfo {
  String appInstanceId,
  String appDId,
  InstantiationState instantiationState
}

type record of SelectedMECHostInfo SelectedMECHostInfoList
type record SelectedMECHostInfo {
  
}

type record InstantiateAppRequest {
  String appInstanceId,
  SelectedMECHostInfoList selectedMECHostInfo
}

type record InstantiateAppRequestWithError {
  String appId,
  SelectedMECHostInfoList selectedMECHostInfo
}

type record TerminateAppRequest {
	TerminationType	terminationType
}

type record TerminateAppRequestWithError {
 	TerminationTypeWithError terminationTypeWithError
}

type record OperateAppRequest {
  	OperationType	changeStateTo
}

type record OperateAppRequestWithError {
  	OperationTypeWithError	changeStateToWithError
}

type record of AppInstanceLcmOpOcc AppInstanceLcmOpOccList;
type record AppInstanceLcmOpOcc {
	String appLcmOpOccId
}


type record SubscriptionRequest {
	SubscriptionType subscriptionType,
	AnyURI callbackUri
Elian Kraja's avatar
Elian Kraja committed
}

type record SubscriptionRequestWithError {
	SubscriptionType subscriptionType,
	AnyURI callbackUriWithError
Elian Kraja's avatar
Elian Kraja committed
}

type record of SubscriptionInfo SubscriptionInfoList;
type record SubscriptionInfo {
  	String subscriptionId,
  	SubscriptionType subscriptionType,
  	AnyURI callbackUri
}


type record Notification {
  String notificationId,
  NotificationType notificationType,
  String subscriptionId
}

/**
* @desc Problem Details for HTTP APIs
* @member type_ A URI reference according to IETF RFC 3986 that identifies the problem type
* @member title A short, human-readable summary of the problem type
* @member status The HTTP status code for this occurrence of the problem
* @member detail A human-readable explanation specific to this occurrence of the problem
* @member instance A URI reference that identifies the specific occurrence of the problem
* @see IETF RFC 7807 Clause 3.  The Problem Details JSON Object
*/
type record ProblemDetails {
  JSON.String type_,
  JSON.String title,
  UInt32 status,
  JSON.String detail,
  JSON.String instance
} with {
  variant (type_) "name as 'type'";
}


} with {
encode "JSON"
}