New API version with additional structures and params
[ric-plt/xapp-frame.git] / pkg / models / r_a_n_ue_group_list.go
1 // Code generated by go-swagger; DO NOT EDIT.
2
3 package models
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
8 import (
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 // RANUeGroupList r a n ue group list
17 // swagger:model RANUeGroupList
18 type RANUeGroupList struct {
19
20         // r a n imperative policy
21         // Required: true
22         RANImperativePolicy *ImperativePolicyDefinition `json:"RANImperativePolicy"`
23
24         // r a n ue group definition
25         // Required: true
26         RANUeGroupDefinition *RANUeGroupParams `json:"RANUeGroupDefinition"`
27
28         // r a n ue group ID
29         // Required: true
30         RANUeGroupID *int64 `json:"RANUeGroupID"`
31 }
32
33 // Validate validates this r a n ue group list
34 func (m *RANUeGroupList) Validate(formats strfmt.Registry) error {
35         var res []error
36
37         if err := m.validateRANImperativePolicy(formats); err != nil {
38                 res = append(res, err)
39         }
40
41         if err := m.validateRANUeGroupDefinition(formats); err != nil {
42                 res = append(res, err)
43         }
44
45         if err := m.validateRANUeGroupID(formats); err != nil {
46                 res = append(res, err)
47         }
48
49         if len(res) > 0 {
50                 return errors.CompositeValidationError(res...)
51         }
52         return nil
53 }
54
55 func (m *RANUeGroupList) validateRANImperativePolicy(formats strfmt.Registry) error {
56
57         if err := validate.Required("RANImperativePolicy", "body", m.RANImperativePolicy); err != nil {
58                 return err
59         }
60
61         if m.RANImperativePolicy != nil {
62                 if err := m.RANImperativePolicy.Validate(formats); err != nil {
63                         if ve, ok := err.(*errors.Validation); ok {
64                                 return ve.ValidateName("RANImperativePolicy")
65                         }
66                         return err
67                 }
68         }
69
70         return nil
71 }
72
73 func (m *RANUeGroupList) validateRANUeGroupDefinition(formats strfmt.Registry) error {
74
75         if err := validate.Required("RANUeGroupDefinition", "body", m.RANUeGroupDefinition); err != nil {
76                 return err
77         }
78
79         if m.RANUeGroupDefinition != nil {
80                 if err := m.RANUeGroupDefinition.Validate(formats); err != nil {
81                         if ve, ok := err.(*errors.Validation); ok {
82                                 return ve.ValidateName("RANUeGroupDefinition")
83                         }
84                         return err
85                 }
86         }
87
88         return nil
89 }
90
91 func (m *RANUeGroupList) validateRANUeGroupID(formats strfmt.Registry) error {
92
93         if err := validate.Required("RANUeGroupID", "body", m.RANUeGroupID); err != nil {
94                 return err
95         }
96
97         return nil
98 }
99
100 // MarshalBinary interface implementation
101 func (m *RANUeGroupList) MarshalBinary() ([]byte, error) {
102         if m == nil {
103                 return nil, nil
104         }
105         return swag.WriteJSON(m)
106 }
107
108 // UnmarshalBinary interface implementation
109 func (m *RANUeGroupList) UnmarshalBinary(b []byte) error {
110         var res RANUeGroupList
111         if err := swag.ReadJSON(b, &res); err != nil {
112                 return err
113         }
114         *m = res
115         return nil
116 }