Enhancements of REST-based E2 subscription interface
Change-Id: I8a8d7f7367315163fedffe9d12440afa44eecb73
Signed-off-by: Mohamed Abukar <abukar.mohamed@nokia.com>
diff --git a/pkg/clientmodel/action_definition.go b/pkg/clientmodel/action_definition.go
new file mode 100644
index 0000000..54ca9d2
--- /dev/null
+++ b/pkg/clientmodel/action_definition.go
@@ -0,0 +1,43 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package clientmodel
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/swag"
+)
+
+// ActionDefinition E2SM Octet string. ActionDefinition is an OPTIONAL IE
+// swagger:model ActionDefinition
+type ActionDefinition struct {
+
+ // octet string
+ OctetString string `json:"OctetString,omitempty"`
+}
+
+// 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
+ return nil
+}
diff --git a/pkg/clientmodel/action_parameters.go b/pkg/clientmodel/action_parameters.go
deleted file mode 100644
index c73f60b..0000000
--- a/pkg/clientmodel/action_parameters.go
+++ /dev/null
@@ -1,81 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package clientmodel
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/swag"
- "github.com/go-openapi/validate"
-)
-
-// ActionParameters action parameters
-// swagger:model ActionParameters
-type ActionParameters struct {
-
- // action parameter ID
- // Required: true
- ActionParameterID *int64 `json:"ActionParameterID"`
-
- // action parameter value
- // Required: true
- ActionParameterValue *bool `json:"ActionParameterValue"`
-}
-
-// Validate validates this action parameters
-func (m *ActionParameters) Validate(formats strfmt.Registry) error {
- var res []error
-
- if err := m.validateActionParameterID(formats); err != nil {
- res = append(res, err)
- }
-
- if err := m.validateActionParameterValue(formats); err != nil {
- res = append(res, err)
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
-
-func (m *ActionParameters) validateActionParameterID(formats strfmt.Registry) error {
-
- if err := validate.Required("ActionParameterID", "body", m.ActionParameterID); err != nil {
- return err
- }
-
- return nil
-}
-
-func (m *ActionParameters) validateActionParameterValue(formats strfmt.Registry) error {
-
- if err := validate.Required("ActionParameterValue", "body", m.ActionParameterValue); err != nil {
- return err
- }
-
- return nil
-}
-
-// MarshalBinary interface implementation
-func (m *ActionParameters) MarshalBinary() ([]byte, error) {
- if m == nil {
- return nil, nil
- }
- return swag.WriteJSON(m)
-}
-
-// UnmarshalBinary interface implementation
-func (m *ActionParameters) UnmarshalBinary(b []byte) error {
- var res ActionParameters
- if err := swag.ReadJSON(b, &res); err != nil {
- return err
- }
- *m = res
- return nil
-}
diff --git a/pkg/clientmodel/action_to_be_setup.go b/pkg/clientmodel/action_to_be_setup.go
new file mode 100644
index 0000000..88a0b4b
--- /dev/null
+++ b/pkg/clientmodel/action_to_be_setup.go
@@ -0,0 +1,181 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package clientmodel
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "encoding/json"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// ActionToBeSetup action to be setup
+// swagger:model ActionToBeSetup
+type ActionToBeSetup struct {
+
+ // action definition
+ ActionDefinition *ActionDefinition `json:"ActionDefinition,omitempty"`
+
+ // action ID
+ // Required: true
+ // Maximum: 255
+ // Minimum: 0
+ ActionID *int64 `json:"ActionID"`
+
+ // action type
+ // Required: true
+ // Enum: [insert policy report]
+ ActionType *string `json:"ActionType"`
+
+ // subsequent action
+ SubsequentAction *SubsequentAction `json:"SubsequentAction,omitempty"`
+}
+
+// Validate validates this action to be setup
+func (m *ActionToBeSetup) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateActionDefinition(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateActionID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateActionType(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateSubsequentAction(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *ActionToBeSetup) validateActionDefinition(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.ActionDefinition) { // not required
+ 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
+ }
+ }
+
+ return nil
+}
+
+func (m *ActionToBeSetup) validateActionID(formats strfmt.Registry) error {
+
+ if err := validate.Required("ActionID", "body", m.ActionID); err != nil {
+ return err
+ }
+
+ if err := validate.MinimumInt("ActionID", "body", int64(*m.ActionID), 0, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("ActionID", "body", int64(*m.ActionID), 255, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+var actionToBeSetupTypeActionTypePropEnum []interface{}
+
+func init() {
+ var res []string
+ if err := json.Unmarshal([]byte(`["insert","policy","report"]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ actionToBeSetupTypeActionTypePropEnum = append(actionToBeSetupTypeActionTypePropEnum, v)
+ }
+}
+
+const (
+
+ // ActionToBeSetupActionTypeInsert captures enum value "insert"
+ ActionToBeSetupActionTypeInsert string = "insert"
+
+ // ActionToBeSetupActionTypePolicy captures enum value "policy"
+ ActionToBeSetupActionTypePolicy string = "policy"
+
+ // ActionToBeSetupActionTypeReport captures enum value "report"
+ ActionToBeSetupActionTypeReport string = "report"
+)
+
+// prop value enum
+func (m *ActionToBeSetup) validateActionTypeEnum(path, location string, value string) error {
+ if err := validate.Enum(path, location, value, actionToBeSetupTypeActionTypePropEnum); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (m *ActionToBeSetup) validateActionType(formats strfmt.Registry) error {
+
+ if err := validate.Required("ActionType", "body", m.ActionType); err != nil {
+ return err
+ }
+
+ // value enum
+ if err := m.validateActionTypeEnum("ActionType", "body", *m.ActionType); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ActionToBeSetup) validateSubsequentAction(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.SubsequentAction) { // not required
+ return nil
+ }
+
+ if m.SubsequentAction != nil {
+ if err := m.SubsequentAction.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("SubsequentAction")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *ActionToBeSetup) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *ActionToBeSetup) UnmarshalBinary(b []byte) error {
+ var res ActionToBeSetup
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/pkg/clientmodel/event_trigger_list.go b/pkg/clientmodel/actions_to_be_setup.go
similarity index 75%
copy from pkg/clientmodel/event_trigger_list.go
copy to pkg/clientmodel/actions_to_be_setup.go
index f205322..397022e 100644
--- a/pkg/clientmodel/event_trigger_list.go
+++ b/pkg/clientmodel/actions_to_be_setup.go
@@ -14,12 +14,12 @@
"github.com/go-openapi/swag"
)
-// EventTriggerList event trigger list
-// swagger:model EventTriggerList
-type EventTriggerList []*EventTrigger
+// ActionsToBeSetup actions to be setup
+// swagger:model ActionsToBeSetup
+type ActionsToBeSetup []*ActionToBeSetup
-// Validate validates this event trigger list
-func (m EventTriggerList) Validate(formats strfmt.Registry) error {
+// Validate validates this actions to be setup
+func (m ActionsToBeSetup) Validate(formats strfmt.Registry) error {
var res []error
for i := 0; i < len(m); i++ {
diff --git a/pkg/clientmodel/config_metadata.go b/pkg/clientmodel/config_metadata.go
new file mode 100644
index 0000000..c75f0d1
--- /dev/null
+++ b/pkg/clientmodel/config_metadata.go
@@ -0,0 +1,121 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package clientmodel
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "encoding/json"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// ConfigMetadata config metadata
+// swagger:model ConfigMetadata
+type ConfigMetadata struct {
+
+ // The type of the content
+ // Required: true
+ // Enum: [json xml other]
+ ConfigType *string `json:"configType"`
+
+ // Name of the xApp
+ // Required: true
+ XappName *string `json:"xappName"`
+}
+
+// Validate validates this config metadata
+func (m *ConfigMetadata) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateConfigType(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateXappName(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+var configMetadataTypeConfigTypePropEnum []interface{}
+
+func init() {
+ var res []string
+ if err := json.Unmarshal([]byte(`["json","xml","other"]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ configMetadataTypeConfigTypePropEnum = append(configMetadataTypeConfigTypePropEnum, v)
+ }
+}
+
+const (
+
+ // ConfigMetadataConfigTypeJSON captures enum value "json"
+ ConfigMetadataConfigTypeJSON string = "json"
+
+ // ConfigMetadataConfigTypeXML captures enum value "xml"
+ ConfigMetadataConfigTypeXML string = "xml"
+
+ // ConfigMetadataConfigTypeOther captures enum value "other"
+ ConfigMetadataConfigTypeOther string = "other"
+)
+
+// prop value enum
+func (m *ConfigMetadata) validateConfigTypeEnum(path, location string, value string) error {
+ if err := validate.Enum(path, location, value, configMetadataTypeConfigTypePropEnum); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (m *ConfigMetadata) validateConfigType(formats strfmt.Registry) error {
+
+ if err := validate.Required("configType", "body", m.ConfigType); err != nil {
+ return err
+ }
+
+ // value enum
+ if err := m.validateConfigTypeEnum("configType", "body", *m.ConfigType); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ConfigMetadata) validateXappName(formats strfmt.Registry) error {
+
+ if err := validate.Required("xappName", "body", m.XappName); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *ConfigMetadata) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *ConfigMetadata) UnmarshalBinary(b []byte) error {
+ var res ConfigMetadata
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/pkg/clientmodel/event_trigger.go b/pkg/clientmodel/event_trigger.go
deleted file mode 100644
index 02955ce..0000000
--- a/pkg/clientmodel/event_trigger.go
+++ /dev/null
@@ -1,115 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package clientmodel
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "encoding/json"
-
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/swag"
- "github.com/go-openapi/validate"
-)
-
-// EventTrigger event trigger
-// swagger:model EventTrigger
-type EventTrigger struct {
-
- // e n b Id
- ENBID string `json:"ENBId,omitempty"`
-
- // interface direction
- InterfaceDirection int64 `json:"InterfaceDirection,omitempty"`
-
- // plmn Id
- PlmnID string `json:"PlmnId,omitempty"`
-
- // procedure code
- ProcedureCode int64 `json:"ProcedureCode,omitempty"`
-
- // trigger nature
- // Enum: [now on change]
- TriggerNature string `json:"TriggerNature,omitempty"`
-
- // type of message
- TypeOfMessage int64 `json:"TypeOfMessage,omitempty"`
-}
-
-// Validate validates this event trigger
-func (m *EventTrigger) Validate(formats strfmt.Registry) error {
- var res []error
-
- if err := m.validateTriggerNature(formats); err != nil {
- res = append(res, err)
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
-
-var eventTriggerTypeTriggerNaturePropEnum []interface{}
-
-func init() {
- var res []string
- if err := json.Unmarshal([]byte(`["now","on change"]`), &res); err != nil {
- panic(err)
- }
- for _, v := range res {
- eventTriggerTypeTriggerNaturePropEnum = append(eventTriggerTypeTriggerNaturePropEnum, v)
- }
-}
-
-const (
-
- // EventTriggerTriggerNatureNow captures enum value "now"
- EventTriggerTriggerNatureNow string = "now"
-
- // EventTriggerTriggerNatureOnChange captures enum value "on change"
- EventTriggerTriggerNatureOnChange string = "on change"
-)
-
-// prop value enum
-func (m *EventTrigger) validateTriggerNatureEnum(path, location string, value string) error {
- if err := validate.Enum(path, location, value, eventTriggerTypeTriggerNaturePropEnum); err != nil {
- return err
- }
- return nil
-}
-
-func (m *EventTrigger) validateTriggerNature(formats strfmt.Registry) error {
-
- if swag.IsZero(m.TriggerNature) { // not required
- return nil
- }
-
- // value enum
- if err := m.validateTriggerNatureEnum("TriggerNature", "body", m.TriggerNature); err != nil {
- return err
- }
-
- return nil
-}
-
-// MarshalBinary interface implementation
-func (m *EventTrigger) MarshalBinary() ([]byte, error) {
- if m == nil {
- return nil, nil
- }
- return swag.WriteJSON(m)
-}
-
-// UnmarshalBinary interface implementation
-func (m *EventTrigger) UnmarshalBinary(b []byte) error {
- var res EventTrigger
- if err := swag.ReadJSON(b, &res); err != nil {
- return err
- }
- *m = res
- return nil
-}
diff --git a/pkg/clientmodel/event_trigger_definition.go b/pkg/clientmodel/event_trigger_definition.go
new file mode 100644
index 0000000..b9c82a6
--- /dev/null
+++ b/pkg/clientmodel/event_trigger_definition.go
@@ -0,0 +1,43 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package clientmodel
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/swag"
+)
+
+// EventTriggerDefinition E2SM Octet string
+// swagger:model EventTriggerDefinition
+type EventTriggerDefinition struct {
+
+ // octet string
+ OctetString string `json:"OctetString,omitempty"`
+}
+
+// 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
+ return nil
+}
diff --git a/pkg/clientmodel/format1_action_definition.go b/pkg/clientmodel/format1_action_definition.go
deleted file mode 100644
index f28039e..0000000
--- a/pkg/clientmodel/format1_action_definition.go
+++ /dev/null
@@ -1,99 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package clientmodel
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "strconv"
-
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/swag"
- "github.com/go-openapi/validate"
-)
-
-// Format1ActionDefinition format1 action definition
-// swagger:model Format1ActionDefinition
-type Format1ActionDefinition struct {
-
- // action parameters
- // Required: true
- ActionParameters []*ActionParameters `json:"ActionParameters"`
-
- // style ID
- // Required: true
- StyleID *int64 `json:"StyleID"`
-}
-
-// Validate validates this format1 action definition
-func (m *Format1ActionDefinition) Validate(formats strfmt.Registry) error {
- var res []error
-
- if err := m.validateActionParameters(formats); err != nil {
- res = append(res, err)
- }
-
- if err := m.validateStyleID(formats); err != nil {
- res = append(res, err)
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
-
-func (m *Format1ActionDefinition) validateActionParameters(formats strfmt.Registry) error {
-
- if err := validate.Required("ActionParameters", "body", m.ActionParameters); err != nil {
- return err
- }
-
- for i := 0; i < len(m.ActionParameters); i++ {
- if swag.IsZero(m.ActionParameters[i]) { // not required
- continue
- }
-
- if m.ActionParameters[i] != nil {
- if err := m.ActionParameters[i].Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("ActionParameters" + "." + strconv.Itoa(i))
- }
- return err
- }
- }
-
- }
-
- return nil
-}
-
-func (m *Format1ActionDefinition) validateStyleID(formats strfmt.Registry) error {
-
- if err := validate.Required("StyleID", "body", m.StyleID); err != nil {
- return err
- }
-
- return nil
-}
-
-// MarshalBinary interface implementation
-func (m *Format1ActionDefinition) MarshalBinary() ([]byte, error) {
- if m == nil {
- return nil, nil
- }
- return swag.WriteJSON(m)
-}
-
-// UnmarshalBinary interface implementation
-func (m *Format1ActionDefinition) UnmarshalBinary(b []byte) error {
- var res Format1ActionDefinition
- if err := swag.ReadJSON(b, &res); err != nil {
- return err
- }
- *m = res
- return nil
-}
diff --git a/pkg/clientmodel/format2_action_definition.go b/pkg/clientmodel/format2_action_definition.go
deleted file mode 100644
index 075d07f..0000000
--- a/pkg/clientmodel/format2_action_definition.go
+++ /dev/null
@@ -1,82 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package clientmodel
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "strconv"
-
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/swag"
- "github.com/go-openapi/validate"
-)
-
-// Format2ActionDefinition format2 action definition
-// swagger:model Format2ActionDefinition
-type Format2ActionDefinition struct {
-
- // r a n ue group parameters
- // Required: true
- RANUeGroupParameters []*RANUeGroupList `json:"RANUeGroupParameters"`
-}
-
-// Validate validates this format2 action definition
-func (m *Format2ActionDefinition) Validate(formats strfmt.Registry) error {
- var res []error
-
- if err := m.validateRANUeGroupParameters(formats); err != nil {
- res = append(res, err)
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
-
-func (m *Format2ActionDefinition) validateRANUeGroupParameters(formats strfmt.Registry) error {
-
- if err := validate.Required("RANUeGroupParameters", "body", m.RANUeGroupParameters); err != nil {
- return err
- }
-
- for i := 0; i < len(m.RANUeGroupParameters); i++ {
- if swag.IsZero(m.RANUeGroupParameters[i]) { // not required
- continue
- }
-
- if m.RANUeGroupParameters[i] != nil {
- if err := m.RANUeGroupParameters[i].Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("RANUeGroupParameters" + "." + strconv.Itoa(i))
- }
- return err
- }
- }
-
- }
-
- return nil
-}
-
-// MarshalBinary interface implementation
-func (m *Format2ActionDefinition) MarshalBinary() ([]byte, error) {
- if m == nil {
- return nil, nil
- }
- return swag.WriteJSON(m)
-}
-
-// UnmarshalBinary interface implementation
-func (m *Format2ActionDefinition) UnmarshalBinary(b []byte) error {
- var res Format2ActionDefinition
- if err := swag.ReadJSON(b, &res); err != nil {
- return err
- }
- *m = res
- return nil
-}
diff --git a/pkg/clientmodel/imperative_policy_definition.go b/pkg/clientmodel/imperative_policy_definition.go
deleted file mode 100644
index 3163bf9..0000000
--- a/pkg/clientmodel/imperative_policy_definition.go
+++ /dev/null
@@ -1,81 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package clientmodel
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/swag"
- "github.com/go-openapi/validate"
-)
-
-// ImperativePolicyDefinition imperative policy definition
-// swagger:model ImperativePolicyDefinition
-type ImperativePolicyDefinition struct {
-
- // policy parameter ID
- // Required: true
- PolicyParameterID *int64 `json:"PolicyParameterID"`
-
- // policy parameter value
- // Required: true
- PolicyParameterValue *int64 `json:"PolicyParameterValue"`
-}
-
-// Validate validates this imperative policy definition
-func (m *ImperativePolicyDefinition) Validate(formats strfmt.Registry) error {
- var res []error
-
- if err := m.validatePolicyParameterID(formats); err != nil {
- res = append(res, err)
- }
-
- if err := m.validatePolicyParameterValue(formats); err != nil {
- res = append(res, err)
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
-
-func (m *ImperativePolicyDefinition) validatePolicyParameterID(formats strfmt.Registry) error {
-
- if err := validate.Required("PolicyParameterID", "body", m.PolicyParameterID); err != nil {
- return err
- }
-
- return nil
-}
-
-func (m *ImperativePolicyDefinition) validatePolicyParameterValue(formats strfmt.Registry) error {
-
- if err := validate.Required("PolicyParameterValue", "body", m.PolicyParameterValue); err != nil {
- return err
- }
-
- return nil
-}
-
-// MarshalBinary interface implementation
-func (m *ImperativePolicyDefinition) MarshalBinary() ([]byte, error) {
- if m == nil {
- return nil, nil
- }
- return swag.WriteJSON(m)
-}
-
-// UnmarshalBinary interface implementation
-func (m *ImperativePolicyDefinition) UnmarshalBinary(b []byte) error {
- var res ImperativePolicyDefinition
- if err := swag.ReadJSON(b, &res); err != nil {
- return err
- }
- *m = res
- return nil
-}
diff --git a/pkg/clientmodel/policy_action_definition.go b/pkg/clientmodel/policy_action_definition.go
deleted file mode 100644
index 4190913..0000000
--- a/pkg/clientmodel/policy_action_definition.go
+++ /dev/null
@@ -1,71 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package clientmodel
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/swag"
-)
-
-// PolicyActionDefinition policy action definition
-// swagger:model PolicyActionDefinition
-type PolicyActionDefinition struct {
-
- // action definition format2
- ActionDefinitionFormat2 *Format2ActionDefinition `json:"ActionDefinitionFormat2,omitempty"`
-}
-
-// Validate validates this policy action definition
-func (m *PolicyActionDefinition) Validate(formats strfmt.Registry) error {
- var res []error
-
- if err := m.validateActionDefinitionFormat2(formats); err != nil {
- res = append(res, err)
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
-
-func (m *PolicyActionDefinition) validateActionDefinitionFormat2(formats strfmt.Registry) error {
-
- if swag.IsZero(m.ActionDefinitionFormat2) { // not required
- return nil
- }
-
- if m.ActionDefinitionFormat2 != nil {
- if err := m.ActionDefinitionFormat2.Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("ActionDefinitionFormat2")
- }
- return err
- }
- }
-
- return nil
-}
-
-// MarshalBinary interface implementation
-func (m *PolicyActionDefinition) MarshalBinary() ([]byte, error) {
- if m == nil {
- return nil, nil
- }
- return swag.WriteJSON(m)
-}
-
-// UnmarshalBinary interface implementation
-func (m *PolicyActionDefinition) UnmarshalBinary(b []byte) error {
- var res PolicyActionDefinition
- if err := swag.ReadJSON(b, &res); err != nil {
- return err
- }
- *m = res
- return nil
-}
diff --git a/pkg/clientmodel/policy_params.go b/pkg/clientmodel/policy_params.go
deleted file mode 100644
index 210fba7..0000000
--- a/pkg/clientmodel/policy_params.go
+++ /dev/null
@@ -1,148 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package clientmodel
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/swag"
- "github.com/go-openapi/validate"
-)
-
-// PolicyParams policy params
-// swagger:model PolicyParams
-type PolicyParams struct {
-
- // client endpoint
- // Required: true
- ClientEndpoint *string `json:"ClientEndpoint"`
-
- // event triggers
- // Required: true
- EventTriggers EventTriggerList `json:"EventTriggers"`
-
- // meid
- // Required: true
- Meid *string `json:"Meid"`
-
- // policy action definitions
- // Required: true
- PolicyActionDefinitions *PolicyActionDefinition `json:"PolicyActionDefinitions"`
-
- // r a n function ID
- // Required: true
- RANFunctionID *int64 `json:"RANFunctionID"`
-}
-
-// Validate validates this policy params
-func (m *PolicyParams) Validate(formats strfmt.Registry) error {
- var res []error
-
- if err := m.validateClientEndpoint(formats); err != nil {
- res = append(res, err)
- }
-
- if err := m.validateEventTriggers(formats); err != nil {
- res = append(res, err)
- }
-
- if err := m.validateMeid(formats); err != nil {
- res = append(res, err)
- }
-
- if err := m.validatePolicyActionDefinitions(formats); err != nil {
- res = append(res, err)
- }
-
- if err := m.validateRANFunctionID(formats); err != nil {
- res = append(res, err)
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
-
-func (m *PolicyParams) validateClientEndpoint(formats strfmt.Registry) error {
-
- if err := validate.Required("ClientEndpoint", "body", m.ClientEndpoint); err != nil {
- return err
- }
-
- return nil
-}
-
-func (m *PolicyParams) validateEventTriggers(formats strfmt.Registry) error {
-
- if err := validate.Required("EventTriggers", "body", m.EventTriggers); err != nil {
- 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
-}
-
-func (m *PolicyParams) validateMeid(formats strfmt.Registry) error {
-
- if err := validate.Required("Meid", "body", m.Meid); err != nil {
- return err
- }
-
- return nil
-}
-
-func (m *PolicyParams) validatePolicyActionDefinitions(formats strfmt.Registry) error {
-
- if err := validate.Required("PolicyActionDefinitions", "body", m.PolicyActionDefinitions); err != nil {
- return err
- }
-
- if m.PolicyActionDefinitions != nil {
- if err := m.PolicyActionDefinitions.Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("PolicyActionDefinitions")
- }
- return err
- }
- }
-
- return nil
-}
-
-func (m *PolicyParams) validateRANFunctionID(formats strfmt.Registry) error {
-
- if err := validate.Required("RANFunctionID", "body", m.RANFunctionID); err != nil {
- return err
- }
-
- return nil
-}
-
-// MarshalBinary interface implementation
-func (m *PolicyParams) MarshalBinary() ([]byte, error) {
- if m == nil {
- return nil, nil
- }
- return swag.WriteJSON(m)
-}
-
-// UnmarshalBinary interface implementation
-func (m *PolicyParams) UnmarshalBinary(b []byte) error {
- var res PolicyParams
- if err := swag.ReadJSON(b, &res); err != nil {
- return err
- }
- *m = res
- return nil
-}
diff --git a/pkg/clientmodel/r_a_n_ue_group_list.go b/pkg/clientmodel/r_a_n_ue_group_list.go
deleted file mode 100644
index d9d612f..0000000
--- a/pkg/clientmodel/r_a_n_ue_group_list.go
+++ /dev/null
@@ -1,116 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package clientmodel
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/swag"
- "github.com/go-openapi/validate"
-)
-
-// RANUeGroupList r a n ue group list
-// swagger:model RANUeGroupList
-type RANUeGroupList struct {
-
- // r a n imperative policy
- // Required: true
- RANImperativePolicy *ImperativePolicyDefinition `json:"RANImperativePolicy"`
-
- // r a n ue group definition
- // Required: true
- RANUeGroupDefinition *RANUeGroupParams `json:"RANUeGroupDefinition"`
-
- // r a n ue group ID
- // Required: true
- RANUeGroupID *int64 `json:"RANUeGroupID"`
-}
-
-// Validate validates this r a n ue group list
-func (m *RANUeGroupList) Validate(formats strfmt.Registry) error {
- var res []error
-
- if err := m.validateRANImperativePolicy(formats); err != nil {
- res = append(res, err)
- }
-
- if err := m.validateRANUeGroupDefinition(formats); err != nil {
- res = append(res, err)
- }
-
- if err := m.validateRANUeGroupID(formats); err != nil {
- res = append(res, err)
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
-
-func (m *RANUeGroupList) validateRANImperativePolicy(formats strfmt.Registry) error {
-
- if err := validate.Required("RANImperativePolicy", "body", m.RANImperativePolicy); err != nil {
- return err
- }
-
- if m.RANImperativePolicy != nil {
- if err := m.RANImperativePolicy.Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("RANImperativePolicy")
- }
- return err
- }
- }
-
- return nil
-}
-
-func (m *RANUeGroupList) validateRANUeGroupDefinition(formats strfmt.Registry) error {
-
- if err := validate.Required("RANUeGroupDefinition", "body", m.RANUeGroupDefinition); err != nil {
- return err
- }
-
- if m.RANUeGroupDefinition != nil {
- if err := m.RANUeGroupDefinition.Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("RANUeGroupDefinition")
- }
- return err
- }
- }
-
- return nil
-}
-
-func (m *RANUeGroupList) validateRANUeGroupID(formats strfmt.Registry) error {
-
- if err := validate.Required("RANUeGroupID", "body", m.RANUeGroupID); err != nil {
- return err
- }
-
- return nil
-}
-
-// MarshalBinary interface implementation
-func (m *RANUeGroupList) MarshalBinary() ([]byte, error) {
- if m == nil {
- return nil, nil
- }
- return swag.WriteJSON(m)
-}
-
-// UnmarshalBinary interface implementation
-func (m *RANUeGroupList) UnmarshalBinary(b []byte) error {
- var res RANUeGroupList
- if err := swag.ReadJSON(b, &res); err != nil {
- return err
- }
- *m = res
- return nil
-}
diff --git a/pkg/clientmodel/r_a_n_ue_group_params.go b/pkg/clientmodel/r_a_n_ue_group_params.go
deleted file mode 100644
index ba24f98..0000000
--- a/pkg/clientmodel/r_a_n_ue_group_params.go
+++ /dev/null
@@ -1,143 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package clientmodel
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "encoding/json"
-
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/swag"
- "github.com/go-openapi/validate"
-)
-
-// RANUeGroupParams r a n ue group params
-// swagger:model RANUeGroupParams
-type RANUeGroupParams struct {
-
- // r a n parameter ID
- // Required: true
- RANParameterID *int64 `json:"RANParameterID"`
-
- // r a n parameter test condition
- // Enum: [equal greaterthan lessthan contains present]
- RANParameterTestCondition string `json:"RANParameterTestCondition,omitempty"`
-
- // r a n parameter value
- // Required: true
- RANParameterValue *int64 `json:"RANParameterValue"`
-}
-
-// Validate validates this r a n ue group params
-func (m *RANUeGroupParams) Validate(formats strfmt.Registry) error {
- var res []error
-
- if err := m.validateRANParameterID(formats); err != nil {
- res = append(res, err)
- }
-
- if err := m.validateRANParameterTestCondition(formats); err != nil {
- res = append(res, err)
- }
-
- if err := m.validateRANParameterValue(formats); err != nil {
- res = append(res, err)
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
-
-func (m *RANUeGroupParams) validateRANParameterID(formats strfmt.Registry) error {
-
- if err := validate.Required("RANParameterID", "body", m.RANParameterID); err != nil {
- return err
- }
-
- return nil
-}
-
-var rANUeGroupParamsTypeRANParameterTestConditionPropEnum []interface{}
-
-func init() {
- var res []string
- if err := json.Unmarshal([]byte(`["equal","greaterthan","lessthan","contains","present"]`), &res); err != nil {
- panic(err)
- }
- for _, v := range res {
- rANUeGroupParamsTypeRANParameterTestConditionPropEnum = append(rANUeGroupParamsTypeRANParameterTestConditionPropEnum, v)
- }
-}
-
-const (
-
- // RANUeGroupParamsRANParameterTestConditionEqual captures enum value "equal"
- RANUeGroupParamsRANParameterTestConditionEqual string = "equal"
-
- // RANUeGroupParamsRANParameterTestConditionGreaterthan captures enum value "greaterthan"
- RANUeGroupParamsRANParameterTestConditionGreaterthan string = "greaterthan"
-
- // RANUeGroupParamsRANParameterTestConditionLessthan captures enum value "lessthan"
- RANUeGroupParamsRANParameterTestConditionLessthan string = "lessthan"
-
- // RANUeGroupParamsRANParameterTestConditionContains captures enum value "contains"
- RANUeGroupParamsRANParameterTestConditionContains string = "contains"
-
- // RANUeGroupParamsRANParameterTestConditionPresent captures enum value "present"
- RANUeGroupParamsRANParameterTestConditionPresent string = "present"
-)
-
-// prop value enum
-func (m *RANUeGroupParams) validateRANParameterTestConditionEnum(path, location string, value string) error {
- if err := validate.Enum(path, location, value, rANUeGroupParamsTypeRANParameterTestConditionPropEnum); err != nil {
- return err
- }
- return nil
-}
-
-func (m *RANUeGroupParams) validateRANParameterTestCondition(formats strfmt.Registry) error {
-
- if swag.IsZero(m.RANParameterTestCondition) { // not required
- return nil
- }
-
- // value enum
- if err := m.validateRANParameterTestConditionEnum("RANParameterTestCondition", "body", m.RANParameterTestCondition); err != nil {
- return err
- }
-
- return nil
-}
-
-func (m *RANUeGroupParams) validateRANParameterValue(formats strfmt.Registry) error {
-
- if err := validate.Required("RANParameterValue", "body", m.RANParameterValue); err != nil {
- return err
- }
-
- return nil
-}
-
-// MarshalBinary interface implementation
-func (m *RANUeGroupParams) MarshalBinary() ([]byte, error) {
- if m == nil {
- return nil, nil
- }
- return swag.WriteJSON(m)
-}
-
-// UnmarshalBinary interface implementation
-func (m *RANUeGroupParams) UnmarshalBinary(b []byte) error {
- var res RANUeGroupParams
- if err := swag.ReadJSON(b, &res); err != nil {
- return err
- }
- *m = res
- return nil
-}
diff --git a/pkg/clientmodel/report_action_definition.go b/pkg/clientmodel/report_action_definition.go
deleted file mode 100644
index 1657b44..0000000
--- a/pkg/clientmodel/report_action_definition.go
+++ /dev/null
@@ -1,71 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package clientmodel
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/swag"
-)
-
-// ReportActionDefinition report action definition
-// swagger:model ReportActionDefinition
-type ReportActionDefinition struct {
-
- // action definition format1
- ActionDefinitionFormat1 *Format1ActionDefinition `json:"ActionDefinitionFormat1,omitempty"`
-}
-
-// Validate validates this report action definition
-func (m *ReportActionDefinition) Validate(formats strfmt.Registry) error {
- var res []error
-
- if err := m.validateActionDefinitionFormat1(formats); err != nil {
- res = append(res, err)
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
-
-func (m *ReportActionDefinition) validateActionDefinitionFormat1(formats strfmt.Registry) error {
-
- if swag.IsZero(m.ActionDefinitionFormat1) { // not required
- return nil
- }
-
- if m.ActionDefinitionFormat1 != nil {
- if err := m.ActionDefinitionFormat1.Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("ActionDefinitionFormat1")
- }
- return err
- }
- }
-
- return nil
-}
-
-// MarshalBinary interface implementation
-func (m *ReportActionDefinition) MarshalBinary() ([]byte, error) {
- if m == nil {
- return nil, nil
- }
- return swag.WriteJSON(m)
-}
-
-// UnmarshalBinary interface implementation
-func (m *ReportActionDefinition) UnmarshalBinary(b []byte) error {
- var res ReportActionDefinition
- if err := swag.ReadJSON(b, &res); err != nil {
- return err
- }
- *m = res
- return nil
-}
diff --git a/pkg/clientmodel/report_params.go b/pkg/clientmodel/report_params.go
deleted file mode 100644
index 151c2d0..0000000
--- a/pkg/clientmodel/report_params.go
+++ /dev/null
@@ -1,133 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package clientmodel
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/swag"
- "github.com/go-openapi/validate"
-)
-
-// ReportParams report params
-// swagger:model ReportParams
-type ReportParams struct {
-
- // client endpoint
- // Required: true
- ClientEndpoint *string `json:"ClientEndpoint"`
-
- // event triggers
- // Required: true
- EventTriggers EventTriggerList `json:"EventTriggers"`
-
- // meid
- Meid string `json:"Meid,omitempty"`
-
- // r a n function ID
- // Required: true
- RANFunctionID *int64 `json:"RANFunctionID"`
-
- // report action definitions
- ReportActionDefinitions *ReportActionDefinition `json:"ReportActionDefinitions,omitempty"`
-}
-
-// Validate validates this report params
-func (m *ReportParams) Validate(formats strfmt.Registry) error {
- var res []error
-
- if err := m.validateClientEndpoint(formats); err != nil {
- res = append(res, err)
- }
-
- if err := m.validateEventTriggers(formats); err != nil {
- res = append(res, err)
- }
-
- if err := m.validateRANFunctionID(formats); err != nil {
- res = append(res, err)
- }
-
- if err := m.validateReportActionDefinitions(formats); err != nil {
- res = append(res, err)
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
-
-func (m *ReportParams) validateClientEndpoint(formats strfmt.Registry) error {
-
- if err := validate.Required("ClientEndpoint", "body", m.ClientEndpoint); err != nil {
- return err
- }
-
- return nil
-}
-
-func (m *ReportParams) validateEventTriggers(formats strfmt.Registry) error {
-
- if err := validate.Required("EventTriggers", "body", m.EventTriggers); err != nil {
- 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
-}
-
-func (m *ReportParams) validateRANFunctionID(formats strfmt.Registry) error {
-
- if err := validate.Required("RANFunctionID", "body", m.RANFunctionID); err != nil {
- return err
- }
-
- return nil
-}
-
-func (m *ReportParams) validateReportActionDefinitions(formats strfmt.Registry) error {
-
- if swag.IsZero(m.ReportActionDefinitions) { // not required
- return nil
- }
-
- if m.ReportActionDefinitions != nil {
- if err := m.ReportActionDefinitions.Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("ReportActionDefinitions")
- }
- return err
- }
- }
-
- return nil
-}
-
-// MarshalBinary interface implementation
-func (m *ReportParams) MarshalBinary() ([]byte, error) {
- if m == nil {
- return nil, nil
- }
- return swag.WriteJSON(m)
-}
-
-// UnmarshalBinary interface implementation
-func (m *ReportParams) UnmarshalBinary(b []byte) error {
- var res ReportParams
- if err := swag.ReadJSON(b, &res); err != nil {
- return err
- }
- *m = res
- return nil
-}
diff --git a/pkg/clientmodel/subscription_details.go b/pkg/clientmodel/subscription_details.go
new file mode 100644
index 0000000..05677cd
--- /dev/null
+++ b/pkg/clientmodel/subscription_details.go
@@ -0,0 +1,97 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package clientmodel
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// SubscriptionDetails subscription details
+// swagger:model SubscriptionDetails
+type SubscriptionDetails struct {
+
+ // action to be setup list
+ // Required: true
+ ActionToBeSetupList ActionsToBeSetup `json:"ActionToBeSetupList"`
+
+ // event trigger list
+ // Required: true
+ EventTriggerList *EventTriggerDefinition `json:"EventTriggerList"`
+}
+
+// Validate validates this subscription details
+func (m *SubscriptionDetails) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateActionToBeSetupList(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateEventTriggerList(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *SubscriptionDetails) validateActionToBeSetupList(formats strfmt.Registry) error {
+
+ if err := validate.Required("ActionToBeSetupList", "body", m.ActionToBeSetupList); err != nil {
+ return err
+ }
+
+ if err := m.ActionToBeSetupList.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("ActionToBeSetupList")
+ }
+ return err
+ }
+
+ return nil
+}
+
+func (m *SubscriptionDetails) validateEventTriggerList(formats strfmt.Registry) error {
+
+ if err := validate.Required("EventTriggerList", "body", m.EventTriggerList); err != nil {
+ return err
+ }
+
+ if m.EventTriggerList != nil {
+ if err := m.EventTriggerList.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("EventTriggerList")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *SubscriptionDetails) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *SubscriptionDetails) UnmarshalBinary(b []byte) error {
+ var res SubscriptionDetails
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/pkg/clientmodel/event_trigger_list.go b/pkg/clientmodel/subscription_details_list.go
similarity index 72%
copy from pkg/clientmodel/event_trigger_list.go
copy to pkg/clientmodel/subscription_details_list.go
index f205322..450e08f 100644
--- a/pkg/clientmodel/event_trigger_list.go
+++ b/pkg/clientmodel/subscription_details_list.go
@@ -14,12 +14,12 @@
"github.com/go-openapi/swag"
)
-// EventTriggerList event trigger list
-// swagger:model EventTriggerList
-type EventTriggerList []*EventTrigger
+// SubscriptionDetailsList subscription details list
+// swagger:model SubscriptionDetailsList
+type SubscriptionDetailsList []*SubscriptionDetails
-// Validate validates this event trigger list
-func (m EventTriggerList) Validate(formats strfmt.Registry) error {
+// Validate validates this subscription details list
+func (m SubscriptionDetailsList) Validate(formats strfmt.Registry) error {
var res []error
for i := 0; i < len(m); i++ {
diff --git a/pkg/clientmodel/subscription_instance.go b/pkg/clientmodel/subscription_instance.go
index 4606479..7853a3b 100644
--- a/pkg/clientmodel/subscription_instance.go
+++ b/pkg/clientmodel/subscription_instance.go
@@ -17,12 +17,20 @@
// swagger:model SubscriptionInstance
type SubscriptionInstance struct {
+ // Empty string when no error.
+ // Required: true
+ ErrorCause *string `json:"ErrorCause"`
+
// instance Id
// Required: true
+ // Maximum: 65535
+ // Minimum: 0
InstanceID *int64 `json:"InstanceId"`
// requestor Id
// Required: true
+ // Maximum: 65535
+ // Minimum: 0
RequestorID *int64 `json:"RequestorId"`
}
@@ -30,6 +38,10 @@
func (m *SubscriptionInstance) Validate(formats strfmt.Registry) error {
var res []error
+ if err := m.validateErrorCause(formats); err != nil {
+ res = append(res, err)
+ }
+
if err := m.validateInstanceID(formats); err != nil {
res = append(res, err)
}
@@ -44,12 +56,29 @@
return nil
}
+func (m *SubscriptionInstance) validateErrorCause(formats strfmt.Registry) error {
+
+ if err := validate.Required("ErrorCause", "body", m.ErrorCause); err != nil {
+ return err
+ }
+
+ return nil
+}
+
func (m *SubscriptionInstance) validateInstanceID(formats strfmt.Registry) error {
if err := validate.Required("InstanceId", "body", m.InstanceID); err != nil {
return err
}
+ if err := validate.MinimumInt("InstanceId", "body", int64(*m.InstanceID), 0, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("InstanceId", "body", int64(*m.InstanceID), 65535, false); err != nil {
+ return err
+ }
+
return nil
}
@@ -59,6 +88,14 @@
return err
}
+ if err := validate.MinimumInt("RequestorId", "body", int64(*m.RequestorID), 0, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("RequestorId", "body", int64(*m.RequestorID), 65535, false); err != nil {
+ return err
+ }
+
return nil
}
diff --git a/pkg/clientmodel/subscription_params.go b/pkg/clientmodel/subscription_params.go
new file mode 100644
index 0000000..eb1d875
--- /dev/null
+++ b/pkg/clientmodel/subscription_params.go
@@ -0,0 +1,257 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package clientmodel
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// SubscriptionParams subscription params
+// swagger:model SubscriptionParams
+type SubscriptionParams struct {
+
+ // client endpoint
+ // Required: true
+ ClientEndpoint *SubscriptionParamsClientEndpoint `json:"ClientEndpoint"`
+
+ // instance Id
+ // Required: true
+ // Maximum: 65535
+ // Minimum: 0
+ InstanceID *int64 `json:"InstanceId"`
+
+ // meid
+ // Required: true
+ Meid *string `json:"Meid"`
+
+ // r a n function ID
+ // Required: true
+ // Maximum: 4095
+ // Minimum: 0
+ RANFunctionID *int64 `json:"RANFunctionID"`
+
+ // requestor Id
+ // Required: true
+ // Maximum: 65535
+ // Minimum: 0
+ RequestorID *int64 `json:"RequestorId"`
+
+ // subscription details
+ // Required: true
+ SubscriptionDetails SubscriptionDetailsList `json:"SubscriptionDetails"`
+}
+
+// Validate validates this subscription params
+func (m *SubscriptionParams) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateClientEndpoint(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateInstanceID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateMeid(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateRANFunctionID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateRequestorID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateSubscriptionDetails(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *SubscriptionParams) validateClientEndpoint(formats strfmt.Registry) error {
+
+ if err := validate.Required("ClientEndpoint", "body", m.ClientEndpoint); err != nil {
+ return err
+ }
+
+ if m.ClientEndpoint != nil {
+ if err := m.ClientEndpoint.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("ClientEndpoint")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *SubscriptionParams) validateInstanceID(formats strfmt.Registry) error {
+
+ if err := validate.Required("InstanceId", "body", m.InstanceID); err != nil {
+ return err
+ }
+
+ if err := validate.MinimumInt("InstanceId", "body", int64(*m.InstanceID), 0, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("InstanceId", "body", int64(*m.InstanceID), 65535, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *SubscriptionParams) validateMeid(formats strfmt.Registry) error {
+
+ if err := validate.Required("Meid", "body", m.Meid); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *SubscriptionParams) validateRANFunctionID(formats strfmt.Registry) error {
+
+ if err := validate.Required("RANFunctionID", "body", m.RANFunctionID); err != nil {
+ return err
+ }
+
+ if err := validate.MinimumInt("RANFunctionID", "body", int64(*m.RANFunctionID), 0, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("RANFunctionID", "body", int64(*m.RANFunctionID), 4095, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *SubscriptionParams) validateRequestorID(formats strfmt.Registry) error {
+
+ if err := validate.Required("RequestorId", "body", m.RequestorID); err != nil {
+ return err
+ }
+
+ if err := validate.MinimumInt("RequestorId", "body", int64(*m.RequestorID), 0, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("RequestorId", "body", int64(*m.RequestorID), 65535, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *SubscriptionParams) validateSubscriptionDetails(formats strfmt.Registry) error {
+
+ if err := validate.Required("SubscriptionDetails", "body", m.SubscriptionDetails); err != nil {
+ return err
+ }
+
+ if err := m.SubscriptionDetails.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("SubscriptionDetails")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *SubscriptionParams) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *SubscriptionParams) UnmarshalBinary(b []byte) error {
+ var res SubscriptionParams
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
+
+// SubscriptionParamsClientEndpoint xApp service address and port
+// swagger:model SubscriptionParamsClientEndpoint
+type SubscriptionParamsClientEndpoint struct {
+
+ // xApp service address port
+ // Maximum: 65535
+ // Minimum: 0
+ Port *int64 `json:"Port,omitempty"`
+
+ // xApp service address name like 'service-ricxapp-xappname-http.ricxapp'
+ ServiceName string `json:"ServiceName,omitempty"`
+}
+
+// Validate validates this subscription params client endpoint
+func (m *SubscriptionParamsClientEndpoint) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validatePort(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *SubscriptionParamsClientEndpoint) validatePort(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Port) { // not required
+ return nil
+ }
+
+ if err := validate.MinimumInt("ClientEndpoint"+"."+"Port", "body", int64(*m.Port), 0, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("ClientEndpoint"+"."+"Port", "body", int64(*m.Port), 65535, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *SubscriptionParamsClientEndpoint) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *SubscriptionParamsClientEndpoint) UnmarshalBinary(b []byte) error {
+ var res SubscriptionParamsClientEndpoint
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/pkg/clientmodel/subscription_response_item.go b/pkg/clientmodel/subscription_response_item.go
deleted file mode 100644
index 8237495..0000000
--- a/pkg/clientmodel/subscription_response_item.go
+++ /dev/null
@@ -1,98 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package clientmodel
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/swag"
- "github.com/go-openapi/validate"
-)
-
-// SubscriptionResponseItem subscription response item
-// swagger:model SubscriptionResponseItem
-type SubscriptionResponseItem struct {
-
- // instance Id
- // Required: true
- InstanceID *int64 `json:"InstanceId"`
-
- // requestor Id
- // Required: true
- RequestorID *int64 `json:"RequestorId"`
-
- // subscription Id
- // Required: true
- SubscriptionID *string `json:"SubscriptionId"`
-}
-
-// Validate validates this subscription response item
-func (m *SubscriptionResponseItem) Validate(formats strfmt.Registry) error {
- var res []error
-
- if err := m.validateInstanceID(formats); err != nil {
- res = append(res, err)
- }
-
- if err := m.validateRequestorID(formats); err != nil {
- res = append(res, err)
- }
-
- if err := m.validateSubscriptionID(formats); err != nil {
- res = append(res, err)
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
-
-func (m *SubscriptionResponseItem) validateInstanceID(formats strfmt.Registry) error {
-
- if err := validate.Required("InstanceId", "body", m.InstanceID); err != nil {
- return err
- }
-
- return nil
-}
-
-func (m *SubscriptionResponseItem) validateRequestorID(formats strfmt.Registry) error {
-
- if err := validate.Required("RequestorId", "body", m.RequestorID); err != nil {
- return err
- }
-
- return nil
-}
-
-func (m *SubscriptionResponseItem) validateSubscriptionID(formats strfmt.Registry) error {
-
- if err := validate.Required("SubscriptionId", "body", m.SubscriptionID); err != nil {
- return err
- }
-
- return nil
-}
-
-// MarshalBinary interface implementation
-func (m *SubscriptionResponseItem) MarshalBinary() ([]byte, error) {
- if m == nil {
- return nil, nil
- }
- return swag.WriteJSON(m)
-}
-
-// UnmarshalBinary interface implementation
-func (m *SubscriptionResponseItem) UnmarshalBinary(b []byte) error {
- var res SubscriptionResponseItem
- if err := swag.ReadJSON(b, &res); err != nil {
- return err
- }
- *m = res
- return nil
-}
diff --git a/pkg/clientmodel/subscription_type.go b/pkg/clientmodel/subscription_type.go
deleted file mode 100644
index eafbe57..0000000
--- a/pkg/clientmodel/subscription_type.go
+++ /dev/null
@@ -1,66 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package clientmodel
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "encoding/json"
-
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/validate"
-)
-
-// SubscriptionType subscription type
-// swagger:model SubscriptionType
-type SubscriptionType string
-
-const (
-
- // SubscriptionTypeInsert captures enum value "insert"
- SubscriptionTypeInsert SubscriptionType = "insert"
-
- // SubscriptionTypePolicy captures enum value "policy"
- SubscriptionTypePolicy SubscriptionType = "policy"
-
- // SubscriptionTypeReport captures enum value "report"
- SubscriptionTypeReport SubscriptionType = "report"
-)
-
-// for schema
-var subscriptionTypeEnum []interface{}
-
-func init() {
- var res []SubscriptionType
- if err := json.Unmarshal([]byte(`["insert","policy","report"]`), &res); err != nil {
- panic(err)
- }
- for _, v := range res {
- subscriptionTypeEnum = append(subscriptionTypeEnum, v)
- }
-}
-
-func (m SubscriptionType) validateSubscriptionTypeEnum(path, location string, value SubscriptionType) error {
- if err := validate.Enum(path, location, value, subscriptionTypeEnum); err != nil {
- return err
- }
- return nil
-}
-
-// Validate validates this subscription type
-func (m SubscriptionType) Validate(formats strfmt.Registry) error {
- var res []error
-
- // value enum
- if err := m.validateSubscriptionTypeEnum("", "body", m); err != nil {
- return err
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
diff --git a/pkg/clientmodel/subsequent_action.go b/pkg/clientmodel/subsequent_action.go
new file mode 100644
index 0000000..b0c8a0f
--- /dev/null
+++ b/pkg/clientmodel/subsequent_action.go
@@ -0,0 +1,201 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package clientmodel
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "encoding/json"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// SubsequentAction SubsequentAction is an OPTIONAL IE
+// swagger:model SubsequentAction
+type SubsequentAction struct {
+
+ // subsequent action type
+ // Required: true
+ // Enum: [continue wait]
+ SubsequentActionType *string `json:"SubsequentActionType"`
+
+ // time to wait
+ // Required: true
+ // Enum: [zero w1ms w2ms w5ms w10ms w20ms w30ms w40ms w50ms w100ms w200ms w500ms w1s w2s w5s w10s w20s w60s]
+ TimeToWait *string `json:"TimeToWait"`
+}
+
+// Validate validates this subsequent action
+func (m *SubsequentAction) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateSubsequentActionType(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateTimeToWait(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+var subsequentActionTypeSubsequentActionTypePropEnum []interface{}
+
+func init() {
+ var res []string
+ if err := json.Unmarshal([]byte(`["continue","wait"]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ subsequentActionTypeSubsequentActionTypePropEnum = append(subsequentActionTypeSubsequentActionTypePropEnum, v)
+ }
+}
+
+const (
+
+ // SubsequentActionSubsequentActionTypeContinue captures enum value "continue"
+ SubsequentActionSubsequentActionTypeContinue string = "continue"
+
+ // SubsequentActionSubsequentActionTypeWait captures enum value "wait"
+ SubsequentActionSubsequentActionTypeWait string = "wait"
+)
+
+// prop value enum
+func (m *SubsequentAction) validateSubsequentActionTypeEnum(path, location string, value string) error {
+ if err := validate.Enum(path, location, value, subsequentActionTypeSubsequentActionTypePropEnum); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (m *SubsequentAction) validateSubsequentActionType(formats strfmt.Registry) error {
+
+ if err := validate.Required("SubsequentActionType", "body", m.SubsequentActionType); err != nil {
+ return err
+ }
+
+ // value enum
+ if err := m.validateSubsequentActionTypeEnum("SubsequentActionType", "body", *m.SubsequentActionType); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+var subsequentActionTypeTimeToWaitPropEnum []interface{}
+
+func init() {
+ var res []string
+ if err := json.Unmarshal([]byte(`["zero","w1ms","w2ms","w5ms","w10ms","w20ms","w30ms","w40ms","w50ms","w100ms","w200ms","w500ms","w1s","w2s","w5s","w10s","w20s","w60s"]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ subsequentActionTypeTimeToWaitPropEnum = append(subsequentActionTypeTimeToWaitPropEnum, v)
+ }
+}
+
+const (
+
+ // SubsequentActionTimeToWaitZero captures enum value "zero"
+ SubsequentActionTimeToWaitZero string = "zero"
+
+ // SubsequentActionTimeToWaitW1ms captures enum value "w1ms"
+ SubsequentActionTimeToWaitW1ms string = "w1ms"
+
+ // SubsequentActionTimeToWaitW2ms captures enum value "w2ms"
+ SubsequentActionTimeToWaitW2ms string = "w2ms"
+
+ // SubsequentActionTimeToWaitW5ms captures enum value "w5ms"
+ SubsequentActionTimeToWaitW5ms string = "w5ms"
+
+ // SubsequentActionTimeToWaitW10ms captures enum value "w10ms"
+ SubsequentActionTimeToWaitW10ms string = "w10ms"
+
+ // SubsequentActionTimeToWaitW20ms captures enum value "w20ms"
+ SubsequentActionTimeToWaitW20ms string = "w20ms"
+
+ // SubsequentActionTimeToWaitW30ms captures enum value "w30ms"
+ SubsequentActionTimeToWaitW30ms string = "w30ms"
+
+ // SubsequentActionTimeToWaitW40ms captures enum value "w40ms"
+ SubsequentActionTimeToWaitW40ms string = "w40ms"
+
+ // SubsequentActionTimeToWaitW50ms captures enum value "w50ms"
+ SubsequentActionTimeToWaitW50ms string = "w50ms"
+
+ // SubsequentActionTimeToWaitW100ms captures enum value "w100ms"
+ SubsequentActionTimeToWaitW100ms string = "w100ms"
+
+ // SubsequentActionTimeToWaitW200ms captures enum value "w200ms"
+ SubsequentActionTimeToWaitW200ms string = "w200ms"
+
+ // SubsequentActionTimeToWaitW500ms captures enum value "w500ms"
+ SubsequentActionTimeToWaitW500ms string = "w500ms"
+
+ // SubsequentActionTimeToWaitW1s captures enum value "w1s"
+ SubsequentActionTimeToWaitW1s string = "w1s"
+
+ // SubsequentActionTimeToWaitW2s captures enum value "w2s"
+ SubsequentActionTimeToWaitW2s string = "w2s"
+
+ // SubsequentActionTimeToWaitW5s captures enum value "w5s"
+ SubsequentActionTimeToWaitW5s string = "w5s"
+
+ // SubsequentActionTimeToWaitW10s captures enum value "w10s"
+ SubsequentActionTimeToWaitW10s string = "w10s"
+
+ // SubsequentActionTimeToWaitW20s captures enum value "w20s"
+ SubsequentActionTimeToWaitW20s string = "w20s"
+
+ // SubsequentActionTimeToWaitW60s captures enum value "w60s"
+ SubsequentActionTimeToWaitW60s string = "w60s"
+)
+
+// prop value enum
+func (m *SubsequentAction) validateTimeToWaitEnum(path, location string, value string) error {
+ if err := validate.Enum(path, location, value, subsequentActionTypeTimeToWaitPropEnum); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (m *SubsequentAction) validateTimeToWait(formats strfmt.Registry) error {
+
+ if err := validate.Required("TimeToWait", "body", m.TimeToWait); err != nil {
+ return err
+ }
+
+ // value enum
+ if err := m.validateTimeToWaitEnum("TimeToWait", "body", *m.TimeToWait); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *SubsequentAction) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *SubsequentAction) UnmarshalBinary(b []byte) error {
+ var res SubsequentAction
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/pkg/clientmodel/x_app_config.go b/pkg/clientmodel/x_app_config.go
new file mode 100644
index 0000000..b744f3f
--- /dev/null
+++ b/pkg/clientmodel/x_app_config.go
@@ -0,0 +1,90 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package clientmodel
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// XAppConfig x app config
+// swagger:model XAppConfig
+type XAppConfig struct {
+
+ // Configuration in JSON format
+ // Required: true
+ Config interface{} `json:"config"`
+
+ // metadata
+ // Required: true
+ Metadata *ConfigMetadata `json:"metadata"`
+}
+
+// Validate validates this x app config
+func (m *XAppConfig) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateConfig(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateMetadata(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *XAppConfig) validateConfig(formats strfmt.Registry) error {
+
+ if err := validate.Required("config", "body", m.Config); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *XAppConfig) validateMetadata(formats strfmt.Registry) error {
+
+ if err := validate.Required("metadata", "body", m.Metadata); err != nil {
+ return err
+ }
+
+ if m.Metadata != nil {
+ if err := m.Metadata.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("metadata")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *XAppConfig) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *XAppConfig) UnmarshalBinary(b []byte) error {
+ var res XAppConfig
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/pkg/clientmodel/event_trigger_list.go b/pkg/clientmodel/xapp_config_list.go
similarity index 76%
rename from pkg/clientmodel/event_trigger_list.go
rename to pkg/clientmodel/xapp_config_list.go
index f205322..758b7ec 100644
--- a/pkg/clientmodel/event_trigger_list.go
+++ b/pkg/clientmodel/xapp_config_list.go
@@ -14,12 +14,12 @@
"github.com/go-openapi/swag"
)
-// EventTriggerList event trigger list
-// swagger:model EventTriggerList
-type EventTriggerList []*EventTrigger
+// XappConfigList xapp config list
+// swagger:model XappConfigList
+type XappConfigList []*XAppConfig
-// Validate validates this event trigger list
-func (m EventTriggerList) Validate(formats strfmt.Registry) error {
+// Validate validates this xapp config list
+func (m XappConfigList) Validate(formats strfmt.Registry) error {
var res []error
for i := 0; i < len(m); i++ {