items:
$ref: '#/definitions/XAppConfig'
ActionDefinition:
- type: object
- description: E2SM Octet string. ActionDefinition is an OPTIONAL IE
- properties:
- OctetString:
- type: string
+ type: array
+ description: E2SM byte array. ActionDefinition is an OPTIONAL IE
+ items:
+ type: integer
SubsequentAction:
description: SubsequentAction is an OPTIONAL IE
type: object
items:
$ref: '#/definitions/ActionToBeSetup'
EventTriggerDefinition:
- type: object
- description: E2SM Octet string
- properties:
- OctetString:
- type: string
+ type: array
+ description: E2SM byte array
+ items:
+ type: integer
SubscriptionDetail:
type: object
required:
import (
"github.com/go-openapi/strfmt"
- "github.com/go-openapi/swag"
)
-// ActionDefinition E2SM Octet string. ActionDefinition is an OPTIONAL IE
+// ActionDefinition E2SM byte array. ActionDefinition is an OPTIONAL IE
//
// swagger:model ActionDefinition
-type ActionDefinition struct {
-
- // octet string
- OctetString string `json:"OctetString,omitempty"`
-}
+type ActionDefinition []int64
// Validate validates this action definition
-func (m *ActionDefinition) Validate(formats strfmt.Registry) error {
- return nil
-}
-
-// MarshalBinary interface implementation
-func (m *ActionDefinition) MarshalBinary() ([]byte, error) {
- if m == nil {
- return nil, nil
- }
- return swag.WriteJSON(m)
-}
-
-// UnmarshalBinary interface implementation
-func (m *ActionDefinition) UnmarshalBinary(b []byte) error {
- var res ActionDefinition
- if err := swag.ReadJSON(b, &res); err != nil {
- return err
- }
- *m = res
+func (m ActionDefinition) Validate(formats strfmt.Registry) error {
return nil
}
type ActionToBeSetup struct {
// action definition
- ActionDefinition *ActionDefinition `json:"ActionDefinition,omitempty"`
+ ActionDefinition ActionDefinition `json:"ActionDefinition,omitempty"`
// action ID
// Required: true
return nil
}
- if m.ActionDefinition != nil {
- if err := m.ActionDefinition.Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("ActionDefinition")
- }
- return err
+ if err := m.ActionDefinition.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("ActionDefinition")
}
+ return err
}
return nil
import (
"github.com/go-openapi/strfmt"
- "github.com/go-openapi/swag"
)
-// EventTriggerDefinition E2SM Octet string
+// EventTriggerDefinition E2SM byte array
//
// swagger:model EventTriggerDefinition
-type EventTriggerDefinition struct {
-
- // octet string
- OctetString string `json:"OctetString,omitempty"`
-}
+type EventTriggerDefinition []int64
// Validate validates this event trigger definition
-func (m *EventTriggerDefinition) Validate(formats strfmt.Registry) error {
- return nil
-}
-
-// MarshalBinary interface implementation
-func (m *EventTriggerDefinition) MarshalBinary() ([]byte, error) {
- if m == nil {
- return nil, nil
- }
- return swag.WriteJSON(m)
-}
-
-// UnmarshalBinary interface implementation
-func (m *EventTriggerDefinition) UnmarshalBinary(b []byte) error {
- var res EventTriggerDefinition
- if err := swag.ReadJSON(b, &res); err != nil {
- return err
- }
- *m = res
+func (m EventTriggerDefinition) Validate(formats strfmt.Registry) error {
return nil
}
// event triggers
// Required: true
- EventTriggers *EventTriggerDefinition `json:"EventTriggers"`
+ EventTriggers EventTriggerDefinition `json:"EventTriggers"`
// xapp event instance Id
// Required: true
return err
}
- if m.EventTriggers != nil {
- if err := m.EventTriggers.Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("EventTriggers")
- }
- return err
+ if err := m.EventTriggers.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("EventTriggers")
}
+ return err
}
return nil
import (
"github.com/go-openapi/strfmt"
- "github.com/go-openapi/swag"
)
-// ActionDefinition E2SM Octet string. ActionDefinition is an OPTIONAL IE
+// ActionDefinition E2SM byte array. ActionDefinition is an OPTIONAL IE
//
// swagger:model ActionDefinition
-type ActionDefinition struct {
-
- // octet string
- OctetString string `json:"OctetString,omitempty"`
-}
+type ActionDefinition []int64
// Validate validates this action definition
-func (m *ActionDefinition) Validate(formats strfmt.Registry) error {
- return nil
-}
-
-// MarshalBinary interface implementation
-func (m *ActionDefinition) MarshalBinary() ([]byte, error) {
- if m == nil {
- return nil, nil
- }
- return swag.WriteJSON(m)
-}
-
-// UnmarshalBinary interface implementation
-func (m *ActionDefinition) UnmarshalBinary(b []byte) error {
- var res ActionDefinition
- if err := swag.ReadJSON(b, &res); err != nil {
- return err
- }
- *m = res
+func (m ActionDefinition) Validate(formats strfmt.Registry) error {
return nil
}
type ActionToBeSetup struct {
// action definition
- ActionDefinition *ActionDefinition `json:"ActionDefinition,omitempty"`
+ ActionDefinition ActionDefinition `json:"ActionDefinition,omitempty"`
// action ID
// Required: true
return nil
}
- if m.ActionDefinition != nil {
- if err := m.ActionDefinition.Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("ActionDefinition")
- }
- return err
+ if err := m.ActionDefinition.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("ActionDefinition")
}
+ return err
}
return nil
import (
"github.com/go-openapi/strfmt"
- "github.com/go-openapi/swag"
)
-// EventTriggerDefinition E2SM Octet string
+// EventTriggerDefinition E2SM byte array
//
// swagger:model EventTriggerDefinition
-type EventTriggerDefinition struct {
-
- // octet string
- OctetString string `json:"OctetString,omitempty"`
-}
+type EventTriggerDefinition []int64
// Validate validates this event trigger definition
-func (m *EventTriggerDefinition) Validate(formats strfmt.Registry) error {
- return nil
-}
-
-// MarshalBinary interface implementation
-func (m *EventTriggerDefinition) MarshalBinary() ([]byte, error) {
- if m == nil {
- return nil, nil
- }
- return swag.WriteJSON(m)
-}
-
-// UnmarshalBinary interface implementation
-func (m *EventTriggerDefinition) UnmarshalBinary(b []byte) error {
- var res EventTriggerDefinition
- if err := swag.ReadJSON(b, &res); err != nil {
- return err
- }
- *m = res
+func (m EventTriggerDefinition) Validate(formats strfmt.Registry) error {
return nil
}
// event triggers
// Required: true
- EventTriggers *EventTriggerDefinition `json:"EventTriggers"`
+ EventTriggers EventTriggerDefinition `json:"EventTriggers"`
// xapp event instance Id
// Required: true
return err
}
- if m.EventTriggers != nil {
- if err := m.EventTriggers.Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("EventTriggers")
- }
- return err
+ if err := m.EventTriggers.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("EventTriggers")
}
+ return err
}
return nil
},
"definitions": {
"ActionDefinition": {
- "description": "E2SM Octet string. ActionDefinition is an OPTIONAL IE",
- "type": "object",
- "properties": {
- "OctetString": {
- "type": "string"
- }
+ "description": "E2SM byte array. ActionDefinition is an OPTIONAL IE",
+ "type": "array",
+ "items": {
+ "type": "integer"
}
},
"ActionToBeSetup": {
}
},
"EventTriggerDefinition": {
- "description": "E2SM Octet string",
- "type": "object",
- "properties": {
- "OctetString": {
- "type": "string"
- }
+ "description": "E2SM byte array",
+ "type": "array",
+ "items": {
+ "type": "integer"
}
},
"SubscriptionData": {
},
"definitions": {
"ActionDefinition": {
- "description": "E2SM Octet string. ActionDefinition is an OPTIONAL IE",
- "type": "object",
- "properties": {
- "OctetString": {
- "type": "string"
- }
+ "description": "E2SM byte array. ActionDefinition is an OPTIONAL IE",
+ "type": "array",
+ "items": {
+ "type": "integer"
}
},
"ActionToBeSetup": {
}
},
"EventTriggerDefinition": {
- "description": "E2SM Octet string",
- "type": "object",
- "properties": {
- "OctetString": {
- "type": "string"
- }
+ "description": "E2SM byte array",
+ "type": "array",
+ "items": {
+ "type": "integer"
}
},
"SubscriptionData": {
SubscriptionDetails: clientmodel.SubscriptionDetailsList{
&clientmodel.SubscriptionDetail{
XappEventInstanceID: &eventInstanceId,
- EventTriggers: &clientmodel.EventTriggerDefinition{
- OctetString: "1234",
- },
+ EventTriggers: clientmodel.EventTriggerDefinition{00, 0x11, 0x12, 0x13, 0x00, 0x21, 0x22, 0x24, 0x1B, 0x80},
ActionToBeSetupList: clientmodel.ActionsToBeSetup{
&clientmodel.ActionToBeSetup{
- ActionID: &actionId,
- ActionType: &actionType,
- ActionDefinition: &clientmodel.ActionDefinition{
- OctetString: "5678",
- },
+ ActionID: &actionId,
+ ActionType: &actionType,
+ ActionDefinition: clientmodel.ActionDefinition{5, 6, 7, 8},
SubsequentAction: &clientmodel.SubsequentAction{
SubsequentActionType: &subsequestActioType,
TimeToWait: &timeToWait,
SubscriptionDetails: clientmodel.SubscriptionDetailsList{
&clientmodel.SubscriptionDetail{
XappEventInstanceID: &eventInstanceId,
- EventTriggers: &clientmodel.EventTriggerDefinition{
- OctetString: "1234",
- },
+ EventTriggers: clientmodel.EventTriggerDefinition{00, 0x11, 0x12, 0x13, 0x00, 0x21, 0x22, 0x24, 0x1B, 0x80},
ActionToBeSetupList: clientmodel.ActionsToBeSetup{
&clientmodel.ActionToBeSetup{
- ActionID: &actionId,
- ActionType: &actionType,
- ActionDefinition: &clientmodel.ActionDefinition{
- OctetString: "5678",
- },
+ ActionID: &actionId,
+ ActionType: &actionType,
+ ActionDefinition: clientmodel.ActionDefinition{5, 6, 7, 8},
SubsequentAction: &clientmodel.SubsequentAction{
SubsequentActionType: &subsequestActioType,
TimeToWait: &timeToWait,
assert.Equal(suite, clientEndpoint.RMRPort, p.ClientEndpoint.RMRPort)
assert.Equal(suite, xappEventInstanceId, *p.SubscriptionDetails[0].XappEventInstanceID)
- assert.Equal(suite, "1234", p.SubscriptionDetails[0].EventTriggers.OctetString)
+ et := []int64{00, 0x11, 0x12, 0x13, 0x00, 0x21, 0x22, 0x24, 0x1B, 0x80}
+ assert.ElementsMatch(suite, et, p.SubscriptionDetails[0].EventTriggers)
assert.Equal(suite, actionId, *p.SubscriptionDetails[0].ActionToBeSetupList[0].ActionID)
assert.Equal(suite, actionType, *p.SubscriptionDetails[0].ActionToBeSetupList[0].ActionType)
assert.Equal(suite, subsequestActioType, *p.SubscriptionDetails[0].ActionToBeSetupList[0].SubsequentAction.SubsequentActionType)
assert.Equal(suite, timeToWait, *p.SubscriptionDetails[0].ActionToBeSetupList[0].SubsequentAction.TimeToWait)
- assert.Equal(suite, "5678", p.SubscriptionDetails[0].ActionToBeSetupList[0].ActionDefinition.OctetString)
+ assert.ElementsMatch(suite, []int64{5, 6, 7, 8}, p.SubscriptionDetails[0].ActionToBeSetupList[0].ActionDefinition)
// Generate a unique subscriptionId
subscriptionId = fmt.Sprintf("%s-%s", meid, clientEndpoint.Host)