blob: 151c2d00fa9b8cc919a93ef0f4aebb56bf3e6e04 [file] [log] [blame]
Mohamed Abukar3895a8c2020-02-10 09:48:59 +02001// Code generated by go-swagger; DO NOT EDIT.
2
3package clientmodel
4
5// This file was generated by the swagger tool.
6// Editing this file might prove futile when you re-run the swagger generate command
7
8import (
9 strfmt "github.com/go-openapi/strfmt"
10
11 "github.com/go-openapi/errors"
12 "github.com/go-openapi/swag"
13 "github.com/go-openapi/validate"
14)
15
16// ReportParams report params
17// swagger:model ReportParams
18type ReportParams struct {
19
Mohamed Abukar429da192020-02-26 16:46:34 +020020 // client endpoint
21 // Required: true
22 ClientEndpoint *string `json:"ClientEndpoint"`
23
Mohamed Abukar3895a8c2020-02-10 09:48:59 +020024 // event triggers
25 // Required: true
26 EventTriggers EventTriggerList `json:"EventTriggers"`
27
Mohamed Abukar429da192020-02-26 16:46:34 +020028 // meid
29 Meid string `json:"Meid,omitempty"`
30
31 // r a n function ID
Mohamed Abukar3895a8c2020-02-10 09:48:59 +020032 // Required: true
Mohamed Abukar429da192020-02-26 16:46:34 +020033 RANFunctionID *int64 `json:"RANFunctionID"`
34
35 // report action definitions
36 ReportActionDefinitions *ReportActionDefinition `json:"ReportActionDefinitions,omitempty"`
Mohamed Abukar3895a8c2020-02-10 09:48:59 +020037}
38
39// Validate validates this report params
40func (m *ReportParams) Validate(formats strfmt.Registry) error {
41 var res []error
42
Mohamed Abukar429da192020-02-26 16:46:34 +020043 if err := m.validateClientEndpoint(formats); err != nil {
44 res = append(res, err)
45 }
46
Mohamed Abukar3895a8c2020-02-10 09:48:59 +020047 if err := m.validateEventTriggers(formats); err != nil {
48 res = append(res, err)
49 }
50
Mohamed Abukar429da192020-02-26 16:46:34 +020051 if err := m.validateRANFunctionID(formats); err != nil {
52 res = append(res, err)
53 }
54
55 if err := m.validateReportActionDefinitions(formats); err != nil {
Mohamed Abukar3895a8c2020-02-10 09:48:59 +020056 res = append(res, err)
57 }
58
59 if len(res) > 0 {
60 return errors.CompositeValidationError(res...)
61 }
62 return nil
63}
64
Mohamed Abukar429da192020-02-26 16:46:34 +020065func (m *ReportParams) validateClientEndpoint(formats strfmt.Registry) error {
66
67 if err := validate.Required("ClientEndpoint", "body", m.ClientEndpoint); err != nil {
68 return err
69 }
70
71 return nil
72}
73
Mohamed Abukar3895a8c2020-02-10 09:48:59 +020074func (m *ReportParams) validateEventTriggers(formats strfmt.Registry) error {
75
76 if err := validate.Required("EventTriggers", "body", m.EventTriggers); err != nil {
77 return err
78 }
79
80 if err := m.EventTriggers.Validate(formats); err != nil {
81 if ve, ok := err.(*errors.Validation); ok {
82 return ve.ValidateName("EventTriggers")
83 }
84 return err
85 }
86
87 return nil
88}
89
Mohamed Abukar429da192020-02-26 16:46:34 +020090func (m *ReportParams) validateRANFunctionID(formats strfmt.Registry) error {
Mohamed Abukar3895a8c2020-02-10 09:48:59 +020091
Mohamed Abukar429da192020-02-26 16:46:34 +020092 if err := validate.Required("RANFunctionID", "body", m.RANFunctionID); err != nil {
Mohamed Abukar3895a8c2020-02-10 09:48:59 +020093 return err
94 }
95
96 return nil
97}
98
Mohamed Abukar429da192020-02-26 16:46:34 +020099func (m *ReportParams) validateReportActionDefinitions(formats strfmt.Registry) error {
100
101 if swag.IsZero(m.ReportActionDefinitions) { // not required
102 return nil
103 }
104
105 if m.ReportActionDefinitions != nil {
106 if err := m.ReportActionDefinitions.Validate(formats); err != nil {
107 if ve, ok := err.(*errors.Validation); ok {
108 return ve.ValidateName("ReportActionDefinitions")
109 }
110 return err
111 }
112 }
113
114 return nil
115}
116
Mohamed Abukar3895a8c2020-02-10 09:48:59 +0200117// MarshalBinary interface implementation
118func (m *ReportParams) MarshalBinary() ([]byte, error) {
119 if m == nil {
120 return nil, nil
121 }
122 return swag.WriteJSON(m)
123}
124
125// UnmarshalBinary interface implementation
126func (m *ReportParams) UnmarshalBinary(b []byte) error {
127 var res ReportParams
128 if err := swag.ReadJSON(b, &res); err != nil {
129 return err
130 }
131 *m = res
132 return nil
133}