New API version with additional structures and params
[ric-plt/xapp-frame.git] / pkg / clientmodel / r_a_n_ue_group_params.go
1 // Code generated by go-swagger; DO NOT EDIT.
2
3 package 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
8 import (
9         "encoding/json"
10
11         strfmt "github.com/go-openapi/strfmt"
12
13         "github.com/go-openapi/errors"
14         "github.com/go-openapi/swag"
15         "github.com/go-openapi/validate"
16 )
17
18 // RANUeGroupParams r a n ue group params
19 // swagger:model RANUeGroupParams
20 type RANUeGroupParams struct {
21
22         // r a n parameter ID
23         // Required: true
24         RANParameterID *int64 `json:"RANParameterID"`
25
26         // r a n parameter test condition
27         // Enum: [equal greaterthan lessthan contains present]
28         RANParameterTestCondition string `json:"RANParameterTestCondition,omitempty"`
29
30         // r a n parameter value
31         // Required: true
32         RANParameterValue *int64 `json:"RANParameterValue"`
33 }
34
35 // Validate validates this r a n ue group params
36 func (m *RANUeGroupParams) Validate(formats strfmt.Registry) error {
37         var res []error
38
39         if err := m.validateRANParameterID(formats); err != nil {
40                 res = append(res, err)
41         }
42
43         if err := m.validateRANParameterTestCondition(formats); err != nil {
44                 res = append(res, err)
45         }
46
47         if err := m.validateRANParameterValue(formats); err != nil {
48                 res = append(res, err)
49         }
50
51         if len(res) > 0 {
52                 return errors.CompositeValidationError(res...)
53         }
54         return nil
55 }
56
57 func (m *RANUeGroupParams) validateRANParameterID(formats strfmt.Registry) error {
58
59         if err := validate.Required("RANParameterID", "body", m.RANParameterID); err != nil {
60                 return err
61         }
62
63         return nil
64 }
65
66 var rANUeGroupParamsTypeRANParameterTestConditionPropEnum []interface{}
67
68 func init() {
69         var res []string
70         if err := json.Unmarshal([]byte(`["equal","greaterthan","lessthan","contains","present"]`), &res); err != nil {
71                 panic(err)
72         }
73         for _, v := range res {
74                 rANUeGroupParamsTypeRANParameterTestConditionPropEnum = append(rANUeGroupParamsTypeRANParameterTestConditionPropEnum, v)
75         }
76 }
77
78 const (
79
80         // RANUeGroupParamsRANParameterTestConditionEqual captures enum value "equal"
81         RANUeGroupParamsRANParameterTestConditionEqual string = "equal"
82
83         // RANUeGroupParamsRANParameterTestConditionGreaterthan captures enum value "greaterthan"
84         RANUeGroupParamsRANParameterTestConditionGreaterthan string = "greaterthan"
85
86         // RANUeGroupParamsRANParameterTestConditionLessthan captures enum value "lessthan"
87         RANUeGroupParamsRANParameterTestConditionLessthan string = "lessthan"
88
89         // RANUeGroupParamsRANParameterTestConditionContains captures enum value "contains"
90         RANUeGroupParamsRANParameterTestConditionContains string = "contains"
91
92         // RANUeGroupParamsRANParameterTestConditionPresent captures enum value "present"
93         RANUeGroupParamsRANParameterTestConditionPresent string = "present"
94 )
95
96 // prop value enum
97 func (m *RANUeGroupParams) validateRANParameterTestConditionEnum(path, location string, value string) error {
98         if err := validate.Enum(path, location, value, rANUeGroupParamsTypeRANParameterTestConditionPropEnum); err != nil {
99                 return err
100         }
101         return nil
102 }
103
104 func (m *RANUeGroupParams) validateRANParameterTestCondition(formats strfmt.Registry) error {
105
106         if swag.IsZero(m.RANParameterTestCondition) { // not required
107                 return nil
108         }
109
110         // value enum
111         if err := m.validateRANParameterTestConditionEnum("RANParameterTestCondition", "body", m.RANParameterTestCondition); err != nil {
112                 return err
113         }
114
115         return nil
116 }
117
118 func (m *RANUeGroupParams) validateRANParameterValue(formats strfmt.Registry) error {
119
120         if err := validate.Required("RANParameterValue", "body", m.RANParameterValue); err != nil {
121                 return err
122         }
123
124         return nil
125 }
126
127 // MarshalBinary interface implementation
128 func (m *RANUeGroupParams) MarshalBinary() ([]byte, error) {
129         if m == nil {
130                 return nil, nil
131         }
132         return swag.WriteJSON(m)
133 }
134
135 // UnmarshalBinary interface implementation
136 func (m *RANUeGroupParams) UnmarshalBinary(b []byte) error {
137         var res RANUeGroupParams
138         if err := swag.ReadJSON(b, &res); err != nil {
139                 return err
140         }
141         *m = res
142         return nil
143 }