New API version with additional structures and params
Change-Id: I02855719e75a9f8d9a0f56e762e56bdc143803ce
Signed-off-by: Mohamed Abukar <abukar.mohamed@nokia.com>
diff --git a/pkg/clientmodel/report_params.go b/pkg/clientmodel/report_params.go
index 1be3bb1..151c2d0 100644
--- a/pkg/clientmodel/report_params.go
+++ b/pkg/clientmodel/report_params.go
@@ -17,24 +17,42 @@
// swagger:model ReportParams
type ReportParams struct {
+ // client endpoint
+ // Required: true
+ ClientEndpoint *string `json:"ClientEndpoint"`
+
// event triggers
// Required: true
EventTriggers EventTriggerList `json:"EventTriggers"`
- // requestor Id
+ // meid
+ Meid string `json:"Meid,omitempty"`
+
+ // r a n function ID
// Required: true
- RequestorID *int64 `json:"RequestorId"`
+ 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.validateRequestorID(formats); err != nil {
+ if err := m.validateRANFunctionID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateReportActionDefinitions(formats); err != nil {
res = append(res, err)
}
@@ -44,6 +62,15 @@
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 {
@@ -60,15 +87,33 @@
return nil
}
-func (m *ReportParams) validateRequestorID(formats strfmt.Registry) error {
+func (m *ReportParams) validateRANFunctionID(formats strfmt.Registry) error {
- if err := validate.Required("RequestorId", "body", m.RequestorID); err != nil {
+ 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 {