X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Fclientmodel%2Fpolicy_action_definition.go;fp=pkg%2Fclientmodel%2Fpolicy_action_definition.go;h=41909132ac089654fe199b0f9e4d8e604f9fee2d;hb=429da19d53224135082f8b6f65470ae3ee8df176;hp=0000000000000000000000000000000000000000;hpb=e0948fe8b755b4d752ef9da4a46246cf3951c9dc;p=ric-plt%2Fxapp-frame.git diff --git a/pkg/clientmodel/policy_action_definition.go b/pkg/clientmodel/policy_action_definition.go new file mode 100644 index 0000000..4190913 --- /dev/null +++ b/pkg/clientmodel/policy_action_definition.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package clientmodel + +// 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" +) + +// PolicyActionDefinition policy action definition +// swagger:model PolicyActionDefinition +type PolicyActionDefinition struct { + + // action definition format2 + ActionDefinitionFormat2 *Format2ActionDefinition `json:"ActionDefinitionFormat2,omitempty"` +} + +// Validate validates this policy action definition +func (m *PolicyActionDefinition) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateActionDefinitionFormat2(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PolicyActionDefinition) validateActionDefinitionFormat2(formats strfmt.Registry) error { + + if swag.IsZero(m.ActionDefinitionFormat2) { // not required + return nil + } + + if m.ActionDefinitionFormat2 != nil { + if err := m.ActionDefinitionFormat2.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ActionDefinitionFormat2") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *PolicyActionDefinition) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PolicyActionDefinition) UnmarshalBinary(b []byte) error { + var res PolicyActionDefinition + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +}