X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Fmodels%2Fpolicy_params.go;fp=pkg%2Fmodels%2Fpolicy_params.go;h=0000000000000000000000000000000000000000;hb=3602bf801fef17e317cb35a4c710118ec80908b9;hp=ab7b09de29586d8ba50726a85680d929d4c649b7;hpb=060448c051013852d463bc13bfc5f0aa3696ac9c;p=ric-plt%2Fxapp-frame.git diff --git a/pkg/models/policy_params.go b/pkg/models/policy_params.go deleted file mode 100644 index ab7b09d..0000000 --- a/pkg/models/policy_params.go +++ /dev/null @@ -1,148 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// 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 -}